我在 Ubuntu 15.04(Python 2.7.9)下尝试matplotlib
安装时出现以下错误。pip
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 304, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 716, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-hP0laO/matplotlib
说实话,我不知道为什么呼叫setup.py
失败。
答案1
我正在使用 matplotlib 和其他scipy类似的包伊帕特里克和numpy在 Ubuntu 15.04 中。我已经从 Ubuntu 存储库安装了它们。也许你应该安装python-matplotlib和apt-get
您是否尝试过运行:
sudo apt-get update; sudo apt-get install python-matplotlib