如何在Ubuntu上安装最新版本的NumPy/Scipy/Matplotlib/IPython/Pandas

如何在Ubuntu上安装最新版本的NumPy/Scipy/Matplotlib/IPython/Pandas,numpy,matplotlib,pandas,scipy,ipython,Numpy,Matplotlib,Pandas,Scipy,Ipython,用户如何安装比其OS package manager提供的版本更新的Pandas。熊猫需要NumPy,与SciPy、Matplotlib和IPython配合使用效果最好 如何安装最新版本的NumPy/Scipy/Matplotlib/IPython/Pandas?使用Ubuntu,以下是如何安装整个NumPy/Scipy/Matplotlib/IPython/Pandas 使用Python2.7在virtualenv中从Github进行堆栈: 注意:以下说明安装每个软件包的最新开发版本。如果要安

用户如何安装比其OS package manager提供的版本更新的Pandas。熊猫需要NumPy,与SciPy、Matplotlib和IPython配合使用效果最好


如何安装最新版本的NumPy/Scipy/Matplotlib/IPython/Pandas?

使用Ubuntu,以下是如何安装整个NumPy/Scipy/Matplotlib/IPython/Pandas 使用Python2.7在virtualenv中从Github进行堆栈:

注意:以下说明安装每个软件包的最新开发版本。如果要安装最新的标记版本,请在
git clone
之后,检查随附的标记

git tag
并选择要安装的版本

git checkout tag-name
安装并安装: 做一个虚拟人 将站点包添加到sys.path: 安装 安装 安装 安装 安装Matplotlib依赖项 安装 安装 安装
更新: 优势 git方法是,它提供了一种始终保存这些包的方法 最新的:

cd ~/src/package-name
git fetch origin
git rebase --interactive origin/master
按照上述说明进行操作,以确保生成的内容干净,然后重新生成并 重新安装软件包

直接将pip与GitHub结合使用的简写 使用pip可以在一定程度上自动化克隆和安装软件包的上述步骤。例如,我们也可以这样安装NumPy:

pip install git+git://github.com/numpy/numpy.git
更新将是公正的

pip install numpy --upgrade --force-reinstall
--可能需要强制重新安装
标志,因为pip检查PyPI的版本,如果当前版本不小于此版本,则不会更新。

通过Anaconda发行版: 下载并安装 仅在标题中的软件包所在的环境中安装: 注意:我相信anaconda支持Python版本2.6、2.7、3.3和3.4。

在ubuntu中使用 sudo-apt-get-install-ipython

sudo-apt-get-install-sympy


etc

使用或。@unutbu,我认为
最新版本
开发版本
之间有区别。在您的第一个cw回答中,您描述了如何从git安装最新的快照。大多数用户可能更喜欢最新的稳定版本。我认为在你的问题中澄清这一点可能是个好主意。@cel:谢谢你的评论。我已经在社区维基中添加了如何选择最新版本的说明。现在我开始怀疑是否有PPA。我认为答案中应该提到anaconda和canopy。这是安装scipy堆栈的一种非常方便的方法,特别是对于mac和windows用户。@cel:这是一个社区wiki。请随意添加信息。@GBOFI:我忘了包括有关配置virtualenv包装器的说明。我对上面的帖子进行了编辑,以展示它是如何实现的。这是真的,但是包管理器中的python包通常不是最新的可用版本。这就是这个线程被启动的原因。如果你发布代码,你应该确保它是正确的。我将
sudo获得安装python sympy
。。。
pip install -U Cython
sudo apt-get install git
cd ~/src
git clone https://github.com/numpy/numpy.git

sudo apt-get install python-dev build-essential  
sudo apt-get install libatlas-base-dev libatlas3gf-base

# ensure clean build
# this is not necessary the first time, but useful when upgrading
cd ~/src/numpy
/bin/rm -rf ~/src/numpy/build
cdsitepackages && /bin/rm -rf numpy numpy-*-py2.7.egg-info

cd ~/src/numpy
python setup.py build --fcompiler=gnu95
python setup.py install
cd ~/src
git clone https://github.com/scipy/scipy.git

# ensure clean build
cd ~/src/scipy
/bin/rm -rf ~/src/scipy/build
cdsitepackages && /bin/rm -rf scipy scipy-*-py2.7.egg-info

cd ~/src/scipy
git clean -xdf
python setup.py install
pip install -U pyparsing
pip install -U six
pip install -U python-dateutil
pip install -U pytz
sudo apt-get install libzmq-dev
pip install -U tornado pygments pyzmq 
pip install -U nose
sudo apt-get install python-qt4 python-qt4-doc python-pyside python-cairo python-wxgtk2.8 python-gtk2 dvipng

apt-cache depends python-matplotlib | awk '/Depends:/{print $2}' | xargs dpkg --get-selections
sudo apt-get build-dep python-matplotlib
cd ~/src/
git clone https://github.com/matplotlib/matplotlib

# ensure clean build
cd ~/src/matplotlib
/bin/rm -rf ~/src/matplotlib/build
cdsitepackages && /bin/rm -rf matplotlib* mpl_toolkits

# compile and install
cd ~/src/matplotlib
python setup.py build
python setup.py install
cd ~/src
git clone https://github.com/ipython/ipython.git

# ensure clean build
cd ~/src/ipython
/bin/rm -rf ~/src/ipython/build
cdsitepackages && /bin/rm -rf ipython-*-py2.7.egg

cd ~/src/ipython
python setupegg.py install
cd ~/src
git clone https://github.com/pydata/pandas.git
cd ~/src/pandas

# update
git fetch origin
git rebase --interactive origin/master

# ensure clean build and install
/bin/rm -rf ~/src/pandas/{build,dist} && cdsitepackages && /bin/rm -rf pandas* && cd ~/src/pandas && python setup.py build_ext --inplace && python setup.py install 
cd ~/src/package-name
git fetch origin
git rebase --interactive origin/master
pip install git+git://github.com/numpy/numpy.git
pip install numpy --upgrade --force-reinstall
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b
export PATH=/home/travis/miniconda/bin:$PATH
conda update conda --yes
conda create --name myenv --yes python=3.4 pandas matplotlib ipython-notebook
source activate myenv