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

linux下编译安装python2.7.6

时间:2017-02-24 19:55:35      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:python2.7.6 编译安装 ipython

安装依赖开发包

yum install  readline-devel 

yum install *argparse*

wget https://www.python.org/ftp/python/2.7.6/Python2.7.6.tgz 

ipython 下载地址https://github.com/ipython/ipython/releases/download/rel-2.1.0/ipython-2.1.0.tar.gz 

编译安装python 2.7.6

[root@bogon ~]# tar -xf python-2.7.6.tgz

[root@bogon Python-2.7.6]# ./configure --prefix=/usr/local/python2.7 

[root@bogon Python-2.7.6]# make && make install 

安装 ipython 补全插件

[root@bogon ~]# tar -xf ipython-5.2.2.tar.gz

 [root@bogon ~]# cd ipython-5.2.2

[root@bogon ipython-5.2.2]# /usr/local/python2.7/bin/python2.7 setup.py install


创建软连接 

[root@bogon ~]# ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27

[root@bogon ~]# ln -sv /usr/local/python27/bin/ipython /usr/bin/



报错 1,

[root@bogon bin]# /usr/local/python2.7/bin/ipython

Traceback (most recent call last):

  File "/usr/local/python2.7/bin/ipython", line 4, in <module>

    from IPython import start_ipython

  File "/usr/local/python2.7/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>

    from .core.application import Application

  File "/usr/local/python2.7/lib/python2.7/site-packages/IPython/core/application.py", line 23, in <module>

    from traitlets.config.application import Application, catch_config_error

ImportError: No module named traitlets.config.application

先  yum install *argparse*   再重新编译安装 python 


本文出自 “明飞成长驿站” 博客,请务必保留此出处http://anyue007.blog.51cto.com/3113658/1901002

linux下编译安装python2.7.6

标签:python2.7.6 编译安装 ipython

原文地址:http://anyue007.blog.51cto.com/3113658/1901002

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