Ibuthon和Matplotlib在Ubuntu 13.10中

Lui*_*tti 2 python ubuntu matplotlib ipython ubuntu-13.10

伙计们,

我最近更新了我的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之外安装这些软件包吗?这不麻烦吗?

谢谢.

Lui*_*tti 6

修复它的方法是使用pip,如@Bogdan所述.

设置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)

部分参考:安装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中的科学做好准备.