build python from source

來源:互聯網
上載者:User

這裡都是片段,暫時還不可用

 

需要的庫

http://ftp.gnu.org/gnu/readline/

http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz
http://www.openssl.org/source/openssl-1.0.0e.tar.gz
http://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz

這幾個安裝方式都一樣 

./configure --prefix=$HOME/usr

但有一個環境變數需要設定

export PKG_CONFIG_PATH=$HOME/usr/lib/pkgconfig

How to build 32-bit Python on Ubuntu 9.10 x86_64

with one comment

This might be useful to someone:
$ cd Python-2.6.4
$ CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 \
-L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" \
./configure --prefix=/opt/pym32
$ make 
$ sudo make install

Now, to check if the build is correct, try to check the max integer size on your standard 64-bit interpreter and in your fresh 32-bit binary:

$ python -c "import sys; print sys.maxint"
9223372036854775807
$ /opt/pym32/bin/python -c "import sys; print sys.maxint"
2147483647

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.