Python 3 virtualenv problems

后端 未结 2 2045
-上瘾入骨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
    

提交回复
热议问题