当前位置: 首页 > Python > 正文

CentOS6.5 Python 2.7.11+IPython 4.2.0

1、下载Python2.7.11

https://www.python.org/downloads/release/python-2711/

解决一个依赖关系

yum install readline-devel
解压、安装

tar xvf Python-2.7.11.tar.xz

cd Python-2.7.11

./configure –prefix=/usr/local/python27

make&&make install

2、下载ipython

https://pypi.python.org/pypi/ipython/4.2.0

tar xvf ipython-4.2.0.tar.gz

cd ipython-4.2.0

/usr/local/python27/bin/python2.7 setup.py install

ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27

ln -sv /usr/local/python27/bin/ipyton /usr/bin/

使用ipython时直接报错

1、报错:ImportError: No module named traitlets

在github 上下载https://github.com/ipython/traitlets

# /usr/local/python27/bin/python2.7 setup.py install

2、报错:ImportError: No module named ipython_genutils

在github 上下载https://github.com/ipython/ipython_genutils

# /usr/local/python27/bin/python2.7 setup.py install

3、报错:ImportError: No module named decorator

在github 上下载https://github.com/micheles/decorator

# /usr/local/python27/bin/python2.7 setup.py install

4、报错:ImportError: No module named setuptools

https://pypi.python.org/pypi/setuptools_scm/#downloads

# /usr/local/python27/bin/python2.7 setup.py install

5、报错:ImportError: No module named pexpect

在github 上下载https://github.com/pexpect/pexpect

# /usr/local/python27/bin/python2.7 setup.py install

6、报错ImportError: No module named ptyprocess

https://pypi.python.org/pypi/ptyprocess#downloads

7、报错ImportError: No module named backports.shutil_get_terminal_size

https://pypi.python.org/pypi/backports.shutil_get_terminal_size/1.0.0#downloads

8、报错ImportError: No module named pickleshare

https://pypi.python.org/pypi/pickleshare/0.6

9、报错ImportError: No module named path

https://pypi.python.org/pypi/path.py/8.2.1

10、报错ImportError: No module named simplegeneric

https://pypi.python.org/pypi/simplegeneric/

直接下载安装,安装时要使用 python27 setup.py install

解决完之后就可以使用ipython

技术分享

至此环境搭建完成

本文出自 “水神” 博客,请务必保留此出处http://lakes.blog.51cto.com/10736359/1788625

本文固定链接: http://t.yjsec.com/index.php/2018/02/08/323/ | 下一站

该日志由 admin 于2018年02月08日发表在 Python 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: CentOS6.5 Python 2.7.11+IPython 4.2.0 | 下一站

CentOS6.5 Python 2.7.11+IPython 4.2.0:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter