`
AILIKES
  • 浏览: 178051 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

安装python2.7

阅读更多

安装python2.7

1、下载
可从 http://www.python.org/进行下载
#wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz

2、复制解压

#mkdir -p /opt/usr/python

#cp  /opt/soft/Python-2.7.10.tgz /opt/usr/python

#cd  /opt/usr/python

#tar zxvf Python-2.7.10.tgz

<!--[if !supportLists]-->3、<!--[endif]-->安装

#cd Python-2.7.10

#./configure --prefix=/usr/local/Python2.7 --enable-shared

#make && make install

4、当出现libpython2.7.so.1.0的错误时

#./python

 ./python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

# /usr/local/Python2.7/bin/python2.7

/usr/local/Python2.7/bin/python2.7: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

libpython2.7.so.1.0的错误时的 解决办法:

#vi /etc/ld.so.conf 添加/usr/local/Python2.7/lib

#/sbin/ldconfig

#/sbin/ldconfig -v

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics