在 fedora 26 上使用 virtualenv venv 时出错
Getting error while using virtualenv venv on fedora 26
我使用 pip3 install --user virtualenv
.
在 fedora 26 上安装了 virtualenv 系统有 python 2.7 和 python 3.6.
当我创建 "virtualenv venv" 时,我得到了这个输出和错误。
New python executable in /home/asraisingh/venv/bin/python2
Also creating executable in /home/asraisingh/venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /home/asraisingh/venv/bin/python2 - setuptools pip wheel:
Traceback (most recent call last):
File "", line 7, in
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/init.py", line 7, in
File "/usr/lib64/python2.7/optparse.py", line 77, in
import textwrap
File "/usr/lib64/python2.7/textwrap.py", line 10, in
import string, re
File "string.py", line 1
KDE: 9
^
SyntaxError: invalid syntax
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/asraisingh/.local/bin/virtualenv", line 11, in
sys.exit(main())
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 713, in main
symlink=options.symlink)
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 945, in create_environment
download=download,
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 901, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 797, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/asraisingh/venv/bin/python2 - setuptools pip wheel failed with error code 1
检查您当前的工作目录中是否有一个名为 string.py
的文件。
如果是这样,请重命名、移动或删除它。这应该可以解决您的问题。
我使用 pip3 install --user virtualenv
.
在 fedora 26 上安装了 virtualenv 系统有 python 2.7 和 python 3.6.
当我创建 "virtualenv venv" 时,我得到了这个输出和错误。
New python executable in /home/asraisingh/venv/bin/python2
Also creating executable in /home/asraisingh/venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /home/asraisingh/venv/bin/python2 - setuptools pip wheel:
Traceback (most recent call last):
File "", line 7, in
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/init.py", line 7, in
File "/usr/lib64/python2.7/optparse.py", line 77, in
import textwrap
File "/usr/lib64/python2.7/textwrap.py", line 10, in
import string, re
File "string.py", line 1 KDE: 9
^
SyntaxError: invalid syntax
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/asraisingh/.local/bin/virtualenv", line 11, in
sys.exit(main())
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 713, in main
symlink=options.symlink)
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 945, in create_environment
download=download,
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 901, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/home/asraisingh/.local/lib/python2.7/site-packages/virtualenv.py", line 797, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/asraisingh/venv/bin/python2 - setuptools pip wheel failed with error code 1
检查您当前的工作目录中是否有一个名为 string.py
的文件。
如果是这样,请重命名、移动或删除它。这应该可以解决您的问题。