你好老师,安装virtualenvwrapper出错是什么原因?,以下是代码
来源:17-5 nginx和virtualenvwrapper的安装和配置
慕侠3297407
2021-06-27
[root@iZ2ze9t7wnt0v5f18tpcveZ Python-3.7.3]# pip install virtualenvwrapper
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting virtualenvwrapper
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/c1/6b/2f05d73b2d2f2410b48b90d3783a0034c26afa534a4a95ad5f1178d61191/virtualenvwrapper-4.8.4.tar.gz (334kB)
|████████████████████████████████| 337kB 14.3MB/s
ERROR: Complete output from command python setup.py egg_info:
ERROR: /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls’
warnings.warn(msg)
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type’
warnings.warn(msg)
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-ef7cqn/virtualenvwrapper/setup.py”, line 7, in
pbr=True,
File “/usr/lib64/python2.7/distutils/core.py”, line 112, in setup
_setup_distribution = dist = klass(attrs)
File “/usr/lib/python2.7/site-packages/setuptools/dist.py”, line 265, in init
self.fetch_build_eggs(attrs.pop(‘setup_requires’))
File “/usr/lib/python2.7/site-packages/setuptools/dist.py”, line 289, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 863, in resolve
replace_conflicting=replace_conflicting
File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 1141, in best_match
return self.obtain(req, installer)
File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 1153, in obtain
return installer(requirement)
File “/usr/lib/python2.7/site-packages/setuptools/dist.py”, line 339, in fetch_build_egg
return cmd.easy_install(req)
File “/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 623, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File “/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 653, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 849, in install_eggs
return self.build_and_install(setup_script, setup_base)
File “/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1130, in build_and_install
self.run_setup(setup_script, setup_base, args)
File “/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1115, in run_setup
run_setup(setup_script, args)
File “/usr/lib/python2.7/site-packages/setuptools/sandbox.py”, line 69, in run_setup
lambda: execfile(
File “/usr/lib/python2.7/site-packages/setuptools/sandbox.py”, line 120, in run
return func()
File “/usr/lib/python2.7/site-packages/setuptools/sandbox.py”, line 71, in
{‘file’:setup_script, ‘name’:‘main’}
File “setup.py”, line 21, in
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2341, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'check_specifier'
----------------------------------------
ERROR: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-ef7cqn/virtualenvwrapper/
WARNING: You are using pip version 19.1.1, however version 20.3.4 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
1回答
-
bobby
2021-06-29
这里报错是python2.7,你使用的是py2.7,最好使用py3,py2已经不维护了,django也不支持py2了
022021-10-03
相似问题