>>>import inspect
>>>print(inspect.getsource(object))
argument may be a module, class,method, function…..
>>>import inspect
>>>print(inspect.getsource(object))
argument may be a module, class,method, function…..
This probably refers to common way of install software from source.
Installing Python manually is possible. As an example, you can use the following instructions to install 3.5.2 version
Prerequisites
Install dependencies :
sudo apt-get update && sudo apt-get install libssl-dev openssl
Building Python
You can build Python in a specific folder using the --prefix parameter from configure command:
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
tar zxf Python-3.5.2.tgz
cd Python-3.5.2/
./configure --prefix=/usr/local
make
sudo make install
Instead of /usr/local, one can use another base directory. As an example:
sudo mkdir /opt/python-3.5.2
./configure --prefix=/opt/python-3.5.2
Selecting python version
Using PATH environment variable can help choosing the right python version to use. But one can also use symlinks:
sudo ln -s /opt/python-3.5.2/bin/python3.5 /usr/local/bin/python3
sudo ln -s /opt/python-3.5.2/bin/pip3.5 /usr/local/bin/pip3
Using -f option will allow you to replace existing symlinks