I just got some space on a VPS server(running on ubuntu 8.04), and I\'m trying to install django on it. The server has python 2.5 installed, but I guess its non standard install
If you are in a scenario where you are using one of the latest versions of Ubuntu (or variants like Linux Mint), one which comes with Python 3.8, then you will NOT be able to have Python3.7 distutils
, alias not be able to use pip
or pipenv
with Python 3.7, see:
How to install python-distutils for old python versions
Obviously using Python3.8 is no problem.
If you are unable to install with either of these:
sudo apt-get install python-distutils
sudo apt-get install python3-distutils
Try this instead:
sudo apt-get install python-distutils-extra
Ref: https://groups.google.com/forum/#!topic/beagleboard/RDlTq8sMxro
You can try installing Python 2.6,
sudo apt-get install python2.6
This should install the latest Python and also distutils package.
I know this is an old question, but I just come across the same issue using Python 3.6 in Ubuntu, and I am able to solve it using the following command:
sudo apt-get install python3-distutils
The simplest way to install setuptools when it isn't already there and you can't use a package manager is to download ez_setup.py and run it with the appropriate Python interpreter. This works even if you have multiple versions of Python around: just run ez_setup.py once with each Python.
Edit: note that recent versions of Python 3 include setuptools in the distribution so you no longer need to install separately. The script mentioned here is only relevant for old versions of Python.