Ubuntu 11.04 x64 下安装Python
2011-06-25 06:07
627 查看
在网上搜了下,找到了如下安装顺序:
Install python2.7
wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
tar xjf Python-2.7.tar.bz2
cd Python-2.7/
./configure
make
sudo make altinstall
Install setuptools
cd ..
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
tar xzf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11/
sudo python2.7 setup.py install
aptitude search libmysqlclient
sudo aptitude install libmysqlclient-dev
Install modules (sqlalchemy, mysqldb)
sudo easy_install-2.7 sqlalchemy
sudo easy_install-2.7 mysql-python
不过在make的时候,出现如下错误:
This is not related to PEP 3149 failures. Ubuntu 11.04 introduced multiarch
directories for the underlying shared libraries used to link to the Python
extension modules. Unpatched, Python's setup.py does not add the necessary
multiarch directories to the search paths, so some extensions won't build.
Ubuntu 11.04's Python packages have been patched to add the correct search
paths. Upstream Python 2.7, 3.1, 3.2, and 3.3 have also been patched to
include the correct search paths, but fixed versions have not been released
upstream yet. Python 2.6 won't be patched.
See issue 11715 for details.
找到了病根,也就好对症下药。拿Python-2.7.2试试,果然OK。
后面到命令都畅通无阻了。
Install python2.7
wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
tar xjf Python-2.7.tar.bz2
cd Python-2.7/
./configure
make
sudo make altinstall
Install setuptools
cd ..
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
tar xzf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11/
sudo python2.7 setup.py install
aptitude search libmysqlclient
sudo aptitude install libmysqlclient-dev
Install modules (sqlalchemy, mysqldb)
sudo easy_install-2.7 sqlalchemy
sudo easy_install-2.7 mysql-python
不过在make的时候,出现如下错误:
> Failed to find the necessary bits to build these modules: > _bsddb _hashlib _ssl > _tkinter bsddb185 dbm > dl gdbm imageop > sunaudiodev > To find the necessary bits, look in setup.py in detect_modules() for the module's name. > > > Failed to build these modules: > crypt nis 继续网上搜寻解决方案,有人建议试下Python-2.6,试下来,错误相同。 继续搜寻,终于在以下地址找到解决方案。 http://groups.google.com/group/sage-devel/browse_thread/thread/593b9a4124f5075d/07ca2f4247c5b9b1?show_docid=07ca2f4247c5b9b1&fwc=1 大致原因如下:
This is not related to PEP 3149 failures. Ubuntu 11.04 introduced multiarch
directories for the underlying shared libraries used to link to the Python
extension modules. Unpatched, Python's setup.py does not add the necessary
multiarch directories to the search paths, so some extensions won't build.
Ubuntu 11.04's Python packages have been patched to add the correct search
paths. Upstream Python 2.7, 3.1, 3.2, and 3.3 have also been patched to
include the correct search paths, but fixed versions have not been released
upstream yet. Python 2.6 won't be patched.
See issue 11715 for details.
找到了病根,也就好对症下药。拿Python-2.7.2试试,果然OK。
后面到命令都畅通无阻了。
相关文章推荐
- Ubuntu 11.04 x64 下安装Python
- Ubuntu_x64 Python3.5安装Tensorflow
- 记录一下安装ubuntu 11.04 x64 目前为止遇到的问题
- Ubuntu 11.04 x64 常用软件及编译安装LAMP开发环境
- [转]ubuntu10.10升级到11.04过程中python2.7升级出错的解决方法(安装wine过程中出错)
- Ubuntu 11.04 x64 常用软件及编译安装LAMP开发环境
- 硬盘安装ubuntu 11.04
- ubuntu安装mysql-python出错,EnvironmentError: mysql_config not found
- ubuntu14.04安装python3.5并且将其设置为python3默认启动
- Ubuntu16.04下安装Python扩展包-scipy,numpy,matplotlib(普通环境和virtualenv虚拟环境)
- Ubuntu16.04 Python 3.6安装Pytorch 0.2
- Ubuntu 11.04 下安装配置 JDK 7
- ubuntu 安装 python3 升级
- Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb
- Python3在ubuntu环境下的安装
- Python安装Scrapy的问题记录(win10/Ubuntu)
- ubuntu安装python集成环境Anaconda,并搭建tensorflow学习框架
- 阿里云Ubuntu系统安装python3.5过程
- Ubuntu16.04下安装python3.5并链接到默认python
- ubuntu 16.04+无法连接wifi+最新caffe+caffe python开发环境- 安装