Lui*_*tti 7 ipython matplotlib
我最近将我的 Ubuntu 更新到了 13.10 版本。令我惊讶的是,Ipython 和 Matplotlib 仅在我之前的 12.04 LTS 安装版本之前可用。
当使用 12.04 时,我在我的存储库中设置了 Julian Taylor PPA,这就是为什么(我认为)我从这两个包中获得了最新版本。
目前 13.10 的版本是:
Matplotlib: 1.2.1 ( http://matplotlib.org/index.html,最新版本是 1.3.1)
Ipython: 0.13.2 ( http://ipython.org,最新版本是 1.1.0 – 2013 年 9 月)
13.10 是否有任何 PPA 可用?JTaylor ppa 仅涵盖 12.10(Quantal,由于堆栈交换中的声誉排名,链接不可用)
我应该在 apt 之外安装这些软件包吗?那不是很麻烦吗?
修复它的方法是使用 pip。
这里描述了设置 pip 的方法:http : //docs.python-guide.org/en/latest/starting/install/linux/#install-linux,它总结为:
(我认为 python-distribute 是在 13.10 中预装的,但检查起来并没有什么坏处)
sudo apt-get install python-distribute
Run Code Online (Sandbox Code Playgroud)
然后我们正确设置python环境:
sudo easy_install pip
sudo pip install virtualenv
Run Code Online (Sandbox Code Playgroud)
之后,执行:
sudo pip install ipython[all]
Run Code Online (Sandbox Code Playgroud)
这将使 pip 处理 ipython 列出的依赖项。此时,IPython 已经正常工作。
可选,安装 matplotlib 和 numpy:
这些处理 matplotlib 和 numpy 的依赖项(假设您已经正确安装了 LaTeX):
apt-get install libfreetype6-dev libpng-dev libpython-all-dev gcc gfortran dvipdf
Run Code Online (Sandbox Code Playgroud)
部分参考:https : //stackoverflow.com/questions/8359383/error-while-installing-matplotlib
我的目标是这样的:
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.3.1]
python: yes [2.7.5+ (default, Sep 19 2013, 13:49:51) [GCC
4.8.1]]
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.7.1]
dateutil: yes [using dateutil version 2.1]
tornado: yes [using tornado version 3.1.1]
pyparsing: yes [using pyparsing version 2.0.1]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 16.1.10]
png: yes [version 1.2.49]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.3.0]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt4agg: yes [installing, Qt: 4.8.4, PyQt4: 4.10.3]
gtk3agg: yes [installing, version 3.4.8]
gtk3cairo: yes [installing, version 3.4.8]
gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
tkagg: no [The C/C++ header for Tk (tk.h) could not be
found. You may need to install the development
package.]
wxagg: no [requires wxPython]
gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
agg: yes [installing]
cairo: yes [installing, version 1.8.8]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: yes [version 1.14]
ghostscript: yes [version 9.10]
latex: yes [version 3.1415926]
pdftops: yes [version 0.24.1]
Run Code Online (Sandbox Code Playgroud)
因此,如果我错过了任何依赖项,请在下面发表评论;)
然后,使用 pip:
sudo pip install matplotlib[all]
Run Code Online (Sandbox Code Playgroud)
它编译,并完成。Ipython、numpy 和 matplotlib 已准备好在 Ubuntu 13.10 中进行科学研究。
| 归档时间: |
|
| 查看次数: |
2818 次 |
| 最近记录: |