错误:找不到Requirement.parse('bdist-egg')的合适分布

时间:2013-10-26 00:00:54

标签: python matplotlib

我正在尝试使用以下命令安装matplotlib并运行到下面的错误,任何人都可以提供输入错误,以及如何解决这个问题?

 easy_install matplotlib

错误: -

Couldn't find index page for 'bdist_egg' (maybe misspelled?)
Couldn't find index page for 'bdist_egg' (maybe misspelled?)
Couldn't find index page for 'bdist_egg' (maybe misspelled?)
Couldn't find index page for 'bdist_egg' (maybe misspelled?)
No local packages or download links found for bdist-egg
error: Could not find suitable distribution for Requirement.parse('bdist-egg')
No local packages or download links found for bdist-egg
error: Could not find suitable distribution for Requirement.parse('bdist-egg')

2 个答案:

答案 0 :(得分:1)

没有必要在Windows上自己构建matplotlib。只需在https://github.com/matplotlib/matplotlib/downloads

使用他们提供的二进制文件即可

答案 1 :(得分:0)

正如VooDooNOFX所说,最简单的方法是在Windows上使用预先构建的可执行文件。当您运行需要为Windows编译的库时,This UIC repository of Windows executables非常有用。这也有比其他一些来源更新的版本 - 在撰写本文时,matplotlib的github页面为1.2.0,而UIC存储库为1.3.1。

如果您只安装了一个版本的python,只需双击可执行文件即可安装该软件包。如果您需要安装到virtual environment,请激活您的环境并使用以下内容安装该软件包:

easy_install mypackage.exe

我发现了这个问题,因为即使遵循这些建议,我也会获得与您相同的输出。如果您仍然看到这些错误,则可能是该软件包安装正确**但easy_install正在尝试再次下载并安装该软件包。

如果您明确告诉easy_install不自动下载并安装其他软件包,则此问题就会消失。您可以使用-N command line option

执行此操作

**您可以输入python -c 'import matplotlib'来测试。良好的安装不会产生任何错误。