我在 Windows 7 上将 Python 2.6 作为我的默认 python,我正在尝试使用 Python 2.7 获得虚拟环境
我在 C:\Python26 中有 python 2.6,在 C:\Python27 中有 python 2.7
当我尝试使用时,virtualenv -p
我得到了这个
C:\web\xxx>virtualenv -p "C:\Python27\python.exe" --no-site-packages venv
Running virtualenv with interpreter C:\Python27\python.exe
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\virtualenv.py", line 2577, in <module>
main()
File "C:\Python26\lib\site-packages\virtualenv.py", line 979, in main
no_pip=options.no_pip)
File "C:\Python26\lib\site-packages\virtualenv.py", line 1081, in create_environment
site_packages=site_packages, clear=clear))
File "C:\Python26\lib\site-packages\virtualenv.py", line 1277, in install_python
copy_required_modules(home_dir)
File "C:\Python26\lib\site-packages\virtualenv.py", line 1215, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "C:\Python26\lib\site-packages\virtualenv.py", line 1185, in change_prefix
(filename, prefixes)
AssertionError: Filename C:\Python26\Lib\os.py does not start with any of these prefixes: ['C:\\Python27']
难道我做错了什么?