我使用的是Windows 10和Python 3.5 64位,并从pip安装了virtualenv。
尝试创建新的虚拟环境时,通常会失败,并显示以下日志记录:
> virtualenv env1
Using base prefix 'c:\\program files\\python 3.5'
New python executable in env1\Scripts\python.exe
Installing setuptools, pip, wheel...
Complete output from command E:\vp\env1\Scripts\python.exe -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
Ignoring indexes: https://pypi.python.org/simple
Collecting setuptools
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "c:\program files\python 3.5\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python 3.5\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python 3.5\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 832, in main
symlink=options.symlink)
File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 1004, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 969, in install_wheel
'PIP_NO_INDEX': '1'
File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 910, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command E:\vp\env1\Scripts\python.exe -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1
当使用**--no-setuptools**执行时,它运行良好并创建了一个虚拟环境。
2条答案
按热度按时间qxgroojn1#
I had the same error. I have Python installed at 'F:\灰尘\pathon3.6'. Due to the Chinese text, I got this error. I notice that your path is 'c:\program files\python 3.5', with a space in 'program files'. I think that's why the error happened.
aiazj4mn2#
我遇到了一个类似但不同的错误,我当前目录中有一个模块覆盖了Python的字符串模块。
这是我的堆栈跟踪。注意它基本上是说string模块没有
maketrans
属性。文档说不是这样的。这是一个很大的暗示,表明string模块有问题,这让我检查目录中多余的模块。