Python 3 virtualenv problems

后端 未结 2 2019
-上瘾入骨i
-上瘾入骨i 2021-01-15 08:30

I\'m having a problem similar to this post, but I am already running the latest version of virtualenv and I also get a different ImportError.

相关标签:
2条回答
  • 2021-01-15 09:21

    The pip program what you are using corresponds to the Python 2.7 version. You need to use the pip which corresponds to Python 3.x. So, you should be using

    pip3 install virtualenv
    

    Alternatively, you can create virtual environments in Python 3.3+ with the venv module, like this

    python3 -m venv test
    
    0 讨论(0)
  • 2021-01-15 09:22

    try following

    virtualenv --no-site-packages --distribute -p /usr/bin/python3 ~/.virtualenvs/py3
    
    workon py3
    
    0 讨论(0)
提交回复
热议问题