John Smith John Smith - 1 year ago 75
Linux Question

How to install python 3.4.3 from source and pip on Debian

I'm trying to setup a server on Debian with Python 3.4.3 and pip.

I installed python 3.4.3 from source into the /opt directory (is that the right one to install to?). I exported the /bin to path with

export PATH="$PATH:/opt/python3.4.3/bin"

but when I close the ssh, it doesn't work when I log back in.

And there isn't a scripts folder... so where is pip?

Answer Source

Add the line in which you export the PATH variable to the .profile and it will work after logging back in.

You can do this by executing

echo 'export PATH="$PATH:/opt/python3.4.3/bin"' >> ~/.profile

Instead of changing the PATH variable, you could simply install python into the system directories (where it is better placed), by going to the root of the source directory and running

sudo make install

If pip is distributed within the python source, then it will be installed, too. Check if pip has been installed by executing

pip --version

If it is not, you have to manually install pip, too. explains how this is done. Simply download the script and run it like this

sudo python
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download