日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu 11.04 x64 下安装Python

發(fā)布時(shí)間:2023/12/10 Ubuntu 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu 11.04 x64 下安装Python 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在網(wǎng)上搜了下,找到了如下安裝順序:

?

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的時(shí)候,出現(xiàn)如下錯(cuò)誤:

> ? 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
繼續(xù)網(wǎng)上搜尋解決方案,有人建議試下Python-2.6,試下來,錯(cuò)誤相同。

繼續(xù)搜尋,終于在以下地址找到解決方案。
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。

?

后面到命令都暢通無阻了。

轉(zhuǎn)載于:https://www.cnblogs.com/andriod-html5/archive/2011/06/25/2539581.html

總結(jié)

以上是生活随笔為你收集整理的Ubuntu 11.04 x64 下安装Python的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。