python创建虚拟环境时出现拒绝访问_无法创建虚拟环境
我無法同時使用Python 2.x或Python 3.x創建虛擬環境。當我嘗試創建虛擬環境時,出現錯誤:$ virtualenv my_env2 [0:05:17] ?[..........]
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/my_env2/bin/python2
Not overwriting existing python script /home/user/my_env2/bin/python (you must use /home/user/my_env2/bin/python2)
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /home/lynx/my_env2/bin/python2 - setuptools pkg_resources pip wheel:
Traceback (most recent call last):
File "", line 7, in
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 31, in
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 9, in
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 40, in
ImportError: cannot import name requests
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python3/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/user/my_env2/bin/python2 - setuptools pkg_resources pip wheel failed with error code 1
Python3.x也出現了同樣的錯誤。你能幫我嗎?在
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的python创建虚拟环境时出现拒绝访问_无法创建虚拟环境的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 下列不属于PHP开发优势的是,php开发
- 下一篇: python等腰梯形_简单空实心图形打印