Ath*_*dom 143 python ubuntu pip matplotlib python-2.7
执行时pip install -r requirements.txt,我在安装阶段遇到以下错误matplotlib:
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [not found. pip may install it below.]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [pkg-config information for 'freetype2' could
not be found.]
Run Code Online (Sandbox Code Playgroud)
...
The following required packages can not be built:
* freetype
Run Code Online (Sandbox Code Playgroud)
还不应该pip install -r requirements.txt安装freetype?如何在Ubuntu 12.04中安装freetype以便它可以使用matplotlib?
Jam*_*lls 218
号pip将不会安装系统级的依赖性.这意味着pip不会安装RPM(基于Redhat的系统)或DEB(基于Debian的系统).
要安装系统依赖项,您需要使用以下方法之一,具体取决于您的系统.
Ubuntu的/ Debian的:
apt-get install libfreetype6-dev
Run Code Online (Sandbox Code Playgroud)
要在基于Ubuntu/Debian的系统上搜索包:
apt-cache search <string>
Run Code Online (Sandbox Code Playgroud)
例如:
apt-cache search freetype | grep dev
Run Code Online (Sandbox Code Playgroud)
红帽/ CentOS的/ Fedora的:
yum -y install freetype-devel
Run Code Online (Sandbox Code Playgroud)
要在Redhat/CentOS/Fedora系统上搜索软件包:
yum search <string>
Run Code Online (Sandbox Code Playgroud)
例如:
yum search freetype | grep devel
Run Code Online (Sandbox Code Playgroud)
Mac OS X的:(通过自制)
brew install freetype
Run Code Online (Sandbox Code Playgroud)
要在基于Mac OS X的系统上搜索包:
brew search <string>
Run Code Online (Sandbox Code Playgroud)
例如:
brew search freetype
Run Code Online (Sandbox Code Playgroud)
Sud*_*sak 141
我必须安装libxft-dev才能在ubuntu服务器14.04上启用matplotlib.
sudo apt-get install libfreetype6-dev libxft-dev
Run Code Online (Sandbox Code Playgroud)
然后我可以使用
sudo easy_install matplotlib
Run Code Online (Sandbox Code Playgroud)
not*_*ing 28
sudo apt-get install pkg-config我在github问题中找到了一个解决方法.
现有的答案都不适合我在Ubuntu上升级matplotlib.这最终对我有用:
$ sudo apt-get install build-dep python-matplotlib
$ pip install matplotlib --upgrade
Run Code Online (Sandbox Code Playgroud)
此命令将下载所有依赖项.
对于python 2.x
sudo apt-get install python-matplotlib
Run Code Online (Sandbox Code Playgroud)
对于python 3.x
sudo apt-get install python3-matplotlib
Run Code Online (Sandbox Code Playgroud)
安装后,您可以尝试
(sudo) pip install matplotlib
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
85574 次 |
| 最近记录: |