Linux & Mac package安装命令

来源:互联网 发布:文献关键词分析软件 编辑:程序博客网 时间:2024/06/06 08:52

以numpy的安装为例:(如果有sudo权限)

Linux packages

Users on Linux can quickly install the necessary packages from repositories.

Ubuntu & Debian

sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

The versions in Ubuntu 12.10 and Debian 7.0 meet the current SciPy stack specification. Users might also want to add the NeuroDebian repository for extra SciPy packages.

Fedora¶

sudo yum install numpy scipy python-matplotlib ipython python-pandas sympy python-nose

Users of Fedora 17 and earlier should then upgrade IPython using pip:

sudo pip install --upgrade ipython

Gentoo

sudo emerge -aN '>=dev-python/numpy-1.6' '>=sci-libs/scipy-0.10' '>=dev-python/matplotlib-1.1' '>=dev-python/ipython-0.13' '>=dev-python/pandas-0.8' '>=dev-python/sympy-0.7' '>=dev-python/nose-1.1'

You may get some messages saying that keyword changes or USE changes are necessary in order to proceed, and that you should use --autounmask-write to write changes to config files. This is especially likely to happen if you are running Gentoo Stable rather than Gentoo Testing, as of this writing (February 2013).

If this happens, just run the above command with --autounmask-write appended, then run sudo dispatch-conf (or an alternative) to save the configuration changes, and finally run the original command again.

Mac packages

Macs (unlike Linux) don’t come with a package manager, but there are a couple of popular package managers you can install.

Macports

To install the scipy stack for Python 2.7 with Macports execute this command in a terminal:

sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose
0 0
原创粉丝点击