作者ccwang002 (亮)
看板Python
标题Re: [问题] 有没有人在Linux环境下安装ipython3成功?
时间Thu Oct 10 08:45:27 2013
※ 引述《mystea (mystea)》之铭言:
: 如题. 我想要在ipython shell底下执行python 3.2
: (我的系统里有python 2.7, 也有python 3.2)
: 我在ubuntu底下执行
原文恕删。如果不要求用 apt 来安装的话,自己编译蛮简单的。
以下用 Python 3.3.2 + IPython 1.1.0 示范在 Ubuntu 12/13
Py 3.2 我没试过 Ubuntu 13 ,但一般建议 Py3.x 可以从 3.3 开始
也比较多套件支援
## 基本工具
sudo apt-get install build-essential xz-utils
## Python 3.3.2 Dependencies
sudo apt-get install libncursesw5-dev libreadline-dev libssl-dev \
libgdbm-dev libc6-dev libsqlite3-dev tk-dev
## Python 3.3.2
wget
http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.xz
tar Jxvf Python-3.3.2.tar.xz
cd Python-3.3.2
./configure # 可以用 ./configure --help 看一下有没有要改变的参数
make
# make test # 会测试是否所有模组都正常安装,需要一点时间
sudo make install
预设会安装到 /usr/local/bin 去所以 export $PATH=/usr/local/bin:$PATH
## Setuptools
wget
https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python3 ez_setup.py
sudo easy_install-3.3 pip
## IPython 0.12+
sudo easy_install-3.3 ipython[all] # 会把所有IPy功能都安装起来
# iptest3 # 测试 IPython 模组安装
## 补充 Numpy 1.7+
# Numpy 已经支援 Python 3.3 罗,编译现在蛮都容易的
# 以 LAPACK, ATLAS 为例
sudo apt-get install liblapack-dev libatlas-base-dev gfortran
sudo pip-3.3 install numpy
# 检查安装
# sudo pip-3.3 install nose
# python3 -c "import numpy as n; n.test()"
--
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 111.241.198.30
※ 编辑: ccwang002 来自: 111.241.198.30 (10/10 08:48)