Zanurkuj w Pythonie/Instalacja ze źródeł

Instalacja ze źródeł edytuj

Jeżeli wolimy zainstalować Pythona ze źródeł, będziemy musieli pobrać kod źródłowy z http://www.python.org/ftp/python/. Wybieramy najnowszą wersję (najwyższy numer) i ściągamy plik .tgz, a następnie wykonujemy standardowe komendy instalacyjne (./configure, make, make install).

localhost:~$ wget http://www.python.org/ftp/python/2.3/Python-2.3.tgz
Resolving www.python.org... done.
...
localhost:~$ tar xfz Python-2.3.tgz
localhost:~$ cd Python-2.3
localhost:~/Python-2.3$ ./configure
checking MACHDEP... linux2
...
localhost:~/Python-2.3$ sudo make
Password: [podajemy swoje hasło]
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. \
    -I./Include  -DPy_BUILD_CORE -o Modules/python.o Modules/python.c
...
localhost:~/Python-2.3$ sudo make install
/usr/bin/install -c python /usr/local/bin/python2.3
...
localhost:~$ which python
/usr/local/bin/python
localhost:~$ python
Python 2.3.1 (#2, Sep 24 2003, 11:39:14)
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> [wciśnij Ctrl+D, żeby wyjść z programu]
localhost:~$