gpt4 book ai didi

python - ubuntu 14.04,pip 无法升级 matplotllib

转载 作者:IT老高 更新时间:2023-10-28 20:30:14 25 4
gpt4 key购买 nike

当我尝试使用 pip 升级我的 matplotlib 时,它会输出:

Downloading/unpacking matplotlib from https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.0.tar.gz#md5=1daf7f2123d94745feac1a30b210940c
Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [1.4.0]
python: yes [2.7.6 (default, Mar 22 2014, 22:59:38) [GCC
4.8.2]]
platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.2]
six: yes [using six version 1.7.3]
dateutil: yes [using dateutil version 2.2]
tornado: yes [using tornado version 4.0.1]
pyparsing: yes [using pyparsing version 2.0.2]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/matplotlib/setup.py", line 154, in <module>
result = package.check()
File "setupext.py", line 940, in check
if 'No such file or directory\ngrep:' in version:
TypeError: argument of type 'NoneType' is not iterable
Complete output from command python setup.py egg_info:
============================================================================

Edit setup.cfg to change the build options



BUILDING MATPLOTLIB

matplotlib: yes [1.4.0]

python: yes [2.7.6 (default, Mar 22 2014, 22:59:38) [GCC

4.8.2]]

platform: yes [linux2]



REQUIRED DEPENDENCIES AND EXTENSIONS

numpy: yes [version 1.8.2]

six: yes [using six version 1.7.3]

dateutil: yes [using dateutil version 2.2]

tornado: yes [using tornado version 4.0.1]

pyparsing: yes [using pyparsing version 2.0.2]

pycxx: yes [Couldn't import. Using local copy.]

libagg: yes [pkg-config information for 'libagg' could not

be found. Using local copy.]

Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/tmp/pip_build_root/matplotlib/setup.py", line 154, in <module>

result = package.check()

File "setupext.py", line 940, in check

if 'No such file or directory\ngrep:' in version:

TypeError: argument of type 'NoneType' is not iterable

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
Storing debug log for failure in /home/username/.pip/pip.log

在日志的尾部它说:

Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib

为什么会失败?非常感谢!

最佳答案

这是一个已知错误,已在 master 上修复 (https://github.com/matplotlib/matplotlib/pull/3414)。

错误在于处理搜索 freetype安装。如果你安装 Linux 包 freetype-dev,你将避免这个 bug,并且能够编译 matplotlib

sudo apt-get install libfreetype6-dev

关于python - ubuntu 14.04,pip 无法升级 matplotllib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25674612/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com