简体   繁体   English

Python pip安装错误

[英]Python pip install error

I have just installed Python 3.4.3 on my MAC (Yosemite). 我刚刚在MAC(Yosemite)上安装了Python 3.4.3。 I need to install a couple of lxml, however everytime I type in: pip install /""/, I get error messages. 我需要安装几个lxml,但是每次键入:pip install /“” /时,我都会收到错误消息。 I have followed multiple tutorials and pip is installed. 我遵循了多个教程并安装了pip。 MAC already had Python 2.7., but I installed the 3.4.3. MAC已经有Python 2.7。,但是我安装了3.4.3。 version, not sure if that is the issue. 版本,不确定是否是问题所在。 The error message is: 错误消息是:

Brunos-MacBook-Pro:~ BrunoPaesLeme$ pip install /Macintosh HD/Users//Downloads/pycairo-1.10.0-cp27-none-win_amd64.whl Exception: Traceback (most recent call last): Brunos-MacBook-Pro:〜BrunoPaesLeme $ pip install / Macintosh HD / Users // Downloads / pycairo-1.10.0-cp27-none-win_amd64.whl例外:回溯(最近一次通话是最近一次):
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 223, in main 主文件223行中的文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py”
status = self.run(options, args) 状态= self.run(选项,参数)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/commands/install.py", line 268, in run wheel_cache 运行wheel_cache中的文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/commands/install.py”,行268
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 268, in populate_requirement_set wheel_cache=wheel_cache 文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py”,行268,位于populate_requirement_set wheel_cache = wheel_cache中
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 207, in from_line wheel_cache=wheel_cache) 文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py”,第207行,位于from_line wheel_cache = wheel_cache)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 66, in init req = pkg_resources.Requirement.parse(req) 文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py”,第66行, init req = pkg_resources.Requirement.parse(req)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/ init .py", line 2960, in parse reqs = list(parse_requirements(s)) 文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/ init .py”,行2960,以parse reqs = list(parse_requirements(s))
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/ init .py", line 2891, in parse_requirements 在parse_requirements中的第2891行,文件“ /Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/ init .py”
raise ValueError("Missing distribution spec", line) ValueError: ('Missing distribution spec', '/Macintosh') 引发ValueError(“ Missing distribution spec”,line)ValueError:('Missing distribution spec','/ Macintosh')

Anybody knows what I could be doing wrong? 有人知道我可能做错了吗? Any help would be appreciated. 任何帮助,将不胜感激。

try: 尝试:

easy_install pip
pip install /"filepath"/

I have similar issue with pip install. 我对pip安装有类似的问题。 However, if I do "sudo su -" then do my pip install 'fileName', that solve the problem for me. 但是,如果我执行“ sudo su-”,然后进行pip安装“ fileName”,则可以为我解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM