这里。 $ virtualenv just_test
Traceback (most recent call last):
File "C:\Python27\Lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\virtualenv.py", line 711, in main
symlink=options.symlink)
File "c:\python27\lib\site-packages\virtualenv.py", line 924, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "c:\python27\lib\site-packages\virtualenv.py", line 1131, in install_python
copy_required_modules(home_dir, symlink)
File "c:\python27\lib\site-packages\virtualenv.py", line 1061, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "c:\python27\lib\site-packages\virtualenv.py", line 1035, in change_prefix
(filename, prefixes)
**AssertionError: Filename C:\Python27\Lib\os.py does not start with any of theseprefixes: ['C:\\python27']**
我的系统环境变量: PYTHONPATH
C:\Python27;C:\Python27\Lib;C:\Python27\DLLs
我该如何解决这个问题?
答案 0 :(得分:0)
最后,我发现了一个丑陋的解决方案如下:
Win + X - &gt;单击命令提示符(管理员) 运行
c:\Python27\python.exe C:\Python27\Lib\site-packages\virtualenv.py venv