码迷,mamicode.com
首页 > 编程语言 > 详细

CentOS6.5 Python 2.7.11+IPython 4.2.0安装

时间:2016-06-13 15:41:30      阅读:551      评论:0      收藏:0      [点我收藏+]

标签:python+ipython

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

CentOS6.5 Python 2.7.11+IPython 4.2.0安装

标签:python+ipython

原文地址:http://lakes.blog.51cto.com/10736359/1788625

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!