Using VirtualEnv with multiple Python versions on windows

前端 未结 6 2008
孤街浪徒
孤街浪徒 2020-12-06 01:21

I have python 2.7.6 and 3.4.0 on my machine. The 2.7 version is on my path. I would like to set up a virtualenv using 3.4. There are many postings on SO and elsewhere that s

6条回答
  •  遥遥无期
    2020-12-06 01:54

    Using GitBash on Windows, I had some trouble getting this to work as well.

    I had Python 3.6 on the Windows path, but was trying to create a Python 2.7 virtual environment for testing an old project.

    Eventually got it working via:

    1. adding the C:\Python27 path to my Windows environment variables 
    2. virtualenv -p c:/python27/python.exe venvname
    

    (and before that I had to buggerize around adding the virtualenv module)

提交回复
热议问题