我已经花了几个小时在这个问题上苦苦挣扎,仍然没有解决。
第三个错误提示说要复制DLL文件,然而这个文件默认已经存在。
C:\Windows\system32>virtualenv django-josh
New python executable in django-josh\Scripts\python.exe
ERROR: The executable django-josh\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is u'c:\\windows\\syswow64\\django-josh' (should be u'c:\\windows\\system32\\django-josh')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
我一直在阅读这篇文章,想要说明的是,我之前已经安装了Python 3,但后来又安装了Python 2.7,并且删除了Python 3。 我想知道是否仍然有Python 3的痕迹留在我的电脑上,即使我找不到任何东西。
更新:我使用以下命令(使用选项)成功使其工作,但我不确定这是否正确。
C:\Windows\system32>virtualenv --distribute C:\Python27\envs\django
New python executable in C:\Python27\envs\django\Scripts\python.exe
Installing setuptools, pip...done.
非常感谢!