문제

I'd like to have a reliable way to install Python interpreters 2.4 through to Python 3.3 on a linux user account. I am fine to presume that there is a C-compiler but i'd like to avoid relying on particular distributions or distribution versions. Is there already something maybe like a simple python script?

update: i am looking for a script/way to do all downloading and installation automatically and report back any problems in a concise summary.

도움이 되었습니까?

해결책

There is something called pythonbrew: https://github.com/utahta/pythonbrew Take a look, maybe this is what you need.

다른 팁

Take a look at the python buildout, a zc.buildout setup for building python versions 2.4-2.7, 3.2 and 3.3.

Originally conceived for building multiple python versions on Mac, I believe it should work on Linux just as well.

You can compile Python for yourself easily enough. Download and extract the Python source tarballs, then use this sequence of commands instead of the usual:

$ ./configure --prefix=$HOME/local
$ make
$ make install

You will probably want to add $HOME/local/bin to your PATH. The different minor/major versions of Python will not interfere with each other, so you can install 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, and 3.3 all at the same time. (There's no point in testing your code against 3.0.)

The program python will be an alias for one of the specific Python versions, such as python2.6.

#!/bin/bash

cd ~/Downloads
wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2
tar xvjf Python-2.4.3.tar.bz2
cd Python-2.4.3
./configure
make
sudo make install
make clean
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top