Site Tools


staff-wiki:modules:python

Python

☑ Centos 7.4
☑ Ubuntu 14.04
☑ Ubuntu 16.04

Notes

You can find the options that Python was compiled with by using this little code snippet

import sysconfig
print(sysconfig.get_config_vars())

Install Dependencies

$ sudo yum install yum-utils
$ sudo yum-builddep python3

Sources

Sources obtained from https://www.python.org/downloads/release/python-362/

Package Local Copy
Python-3.6.2.tar.xz/sw/pkgs/Python-3.6.2.tar.xz

Requirements

Build Process

ktm5j@power3 Python-3.6.2 $ ./configure --prefix=/sw/ubuntu/python/3.6.2/
ktm5j@power3 Python-3.6.2 $ make -j12
ktm5j@power3 Python-3.6.2 $ make install

Install

/sw/ubuntu-14.04/python
├── 3.6.2
│   ├── bin
│   ├── include
│   ├── lib
│   └── share
└── current -> 3.6.2

When python3 installs, there is no binary in bin/ called python. There is python3.6.2 and python3 which is a symlink to python3.6.2. We want to create a symlink for python and for pip:

ktm5j@power3 Python-3.6.2 $ cd /sw/ubuntu-14.04/python/3.6.2/bin
ktm5j@power3 bin $ ln -s python3.6 python
ktm5j@power3 bin $ ln -s pip3.6 pip

Module File

staff-wiki/modules/python.txt · Last modified: 2023/08/29 19:56 by 127.0.0.1