python易于安装的问题

时间:2013-11-26 14:21:36

标签: python python-2.7 matplotlib easy-install matplotlib-venn

我在matplotlib-venn上使用easy_install时遇到问题。我在使用python2.7的Windows计算机上。 我怀疑路径不正确,但我不知道如何解决这个问题。 谁能帮助我? 我正在尝试在CMD提示符中运行easy_install命令附加输出。

C:\Python27\Scripts>easy_install matplotlib-venn
Searching for matplotlib-venn
Reading https://pypi.python.org/simple/matplotlib-venn/
Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004]
 getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'matplotlib-venn' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 11004] getaddrinfo fai
led -- Some packages may not be found!
No local packages or download links found for matplotlib-venn
error: Could not find suitable distribution for Requirement.parse('matplotlib-ve
nn')
install for matplotlib-venn package

尝试pip安装建议的输出:

C:\Python27\Scripts>easy_install pip
Searching for pip
Best match: pip 1.4.1
Adding pip 1.4.1 to easy-install.pth file
Installing pip-script.py script to C:\Python27\Scripts
Installing pip.exe script to C:\Python27\Scripts
Installing pip.exe.manifest script to C:\Python27\Scripts
Installing pip-2.7-script.py script to C:\Python27\Scripts
Installing pip-2.7.exe script to C:\Python27\Scripts
Installing pip-2.7.exe.manifest script to C:\Python27\Scripts
Using c:\python27\lib\site-packages
Processing dependencies for pip
Finished processing dependencies for pip
C:\Python27\Scripts>pip install matplotlib-venn
Downloading/unpacking matplotlib-venn
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement matplotlib-venn
Cleaning up...
No distributions at all found for matplotlib-venn
Storing complete log in C:\Users\jherman8\pip\pip.log

4 个答案:

答案 0 :(得分:17)

基于

Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004] getaddrinfo failed 

Cannot fetch index base URL https://pypi.python.org/simple/ 

似乎您有网络问题。您是在防火墙或代理后面运行机器吗?

要让easy_install在代理后面工作,您必须设置所需的环境,例如

set http_proxy="user:password@server:port"
set https_proxy="user:password@server:port"

对于pip,您可以使用-proxy参数。关于代理背后的pip使用的更多细节请参见此主题:How to use pip on windows behind an authenticating proxy

答案 1 :(得分:2)

我认为这是你的解决方案

easy_install pip
pip install matplotlib-venn

easy_install中没有模块matplotlib-venn

将来,使用pip安装python的任何软件包。

答案 2 :(得分:0)

如果您尝试使用cloudera盒,那么它将在bugzile中正常工作。 https://bugzilla.redhat.com/show_bug.cgi?id=1510444 它适用于我的cloudera vm jut,按照说明进行操作,然后尝试通过easy_install进行安装。

#easy_install -i https://pypi.python.org/simple针迹搜索针迹读https://pypi.python.org/simple/stitches/最佳匹配:针迹0.11下载https://pypi.python.org/packages/9d/73/681005f0f0fb9483f0d94547a35059c776144fc998780b9ef00167a50f3d/stitches-0.11.tar.gz#md5=0ac0b6e418767e6ec5cf684460d1972f处理针迹-0.11.tar.gz运行针迹-0.11 / setup.py- q bdist_egg --dist-dir /tmp/easy_install-ZMIU8w/stitches-0.11/egg-dist-tmp-82ctsZ未设置zip_safe标志;正在分析归档文件中的内容... Stitchs.connection:模块引用文件:在East-install.pth文件中添加Stitch 0.11

已安装/usr/lib/python2.6/site-packages/stitches-0.11-py2.6.egg处理针迹的依赖性... ...搜索pynacl> = 1.0.1阅读https://pypi.python.org/simple/pynacl/最佳匹配:PyNaCl 1.2.0下载https://pypi.python.org/packages/fa/38/0f35ec4beb6562f1abfa07914db1cea978e93da409ba6293f810d9e677d6/PyNaCl-1.2.0.tar.gz#md5=7a31e95f5f457184b1660b71d6808b19处理PyNaCl-1.2.0.tar.gz运行PyNaCl-1.2.0 / setup.py -q bdist_egg --dist-dir / tmp / easy_install-a0vNJS / PyNaCl- 1.2.0 / egg-dist-tmp-QYvAk9检查.pth文件是否支持。 / usr / bin / python -E -c pass搜索cffi> = 1.4.1读取http://pypi.python.org/simple/cffi/找不到'cffi'的索引页(可能拼写错误?)扫描所有软件包的索引(这可能需要一个while)读取http://pypi.python.org/simple/找不到cffi> = 1.4.1错误的本地软件包或下载链接:找不到Requirement.parse('cffi> = 1.4.1')的合适发行版

所以唯一的解决方案是破解源代码:

sed -i s,http://pypi.python.org,https://pypi.python.org,/ usr / lib / python2.6 / site-packages / setuptools / command / easy_install.py

须藤

答案 3 :(得分:-1)

student@student-WIV68105-0080:~$ **sudo apt-cache search rtree**
libcneartree-dev - Library and headers for solving the Nearest Neighbor Problem
libcneartree5 - Library for solving the Nearest Neighbor Problem
student@student-WIV68105-0080:~$ **sudo apt-get install libcneartree-dev libcneartree5**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libcvector2
The following NEW packages will be installed:
  libcneartree-dev libcneartree5 libcvector2

对我来说,rtree包发生了同样的错误,我进行了缓存搜索并安装了库