我在运行pip install requests[security]==2.10.0
时出现问题。
我是使用virtualenv
bento/debian-7.8
在Python 2.7.3
上运行此内容。
这是错误:
Collecting cryptography>=1.9 (from pyOpenSSL>=0.13->requests[security]==2.10.0->-r requirements.txt (line 22))
Exception:
Traceback (most recent call last):
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/commands/install.py", line 305, in run
wb.build(autobuilding=True)
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/wheel.py", line 705, in build
self.requirement_set.prepare_files(self.finder)
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 561, in _prepare_file
set(req_to_install.extras) - set(dist.extras)
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2774, in extras
return [dep for dep in self._dep_map if dep]
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2797, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2830, in _compute_dependencies
common = frozenset(reqs_for_extra(None))
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2827, in reqs_for_extra
if req.marker_fn(override={'extra':extra}):
File "/vagrant/Devel/chalktalk-legacy/chalktalk/env/local/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py", line 113, in marker_fn
return eval(compiled_marker, environment)
File "<environment marker>", line 1, in <module>
NameError: name 'python_implementation' is not defined
答案 0 :(得分:0)
这个问题很可能是因为你的virtualenv中有一个过时的pip版本。尝试使用以下命令升级它:
pip install --upgrade pip