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
I ran across this error on a Beaglebone Black using the standard Angstrom distribution. It is currently running Python 2.7.3, but does not include distutils. The solution for me was to install distutils. (It required su privileges.)
su
opkg install python-distutils
After that installation, the previously erroring command ran fine.
python setup.py build
The module not found likely means the packages aren't installed.
Debian has decided that distutils is not a core python package, so it is not included in the last versions of debian and debian-based OSes. You should be able to do
sudo apt-get install python3-distutils
sudo apt-get install python3-apt
If the system Python is borked (i.e. the OS packages split distutils in a python-devel package) and you can’t ask a sysadmin to install the missing piece, then you’ll have to install your own Python. It requires some header files and a compiler toolchain. If you can’t have those, try compiling a Python on an identical computer and just copying it.
By searching all python-distutils related package:
apt-cache search x
I get python3-distutils-extra - enhancements to the Python3 build system
Then just try:
sudo apt-get install python3-distutils-extra
You can install the python-distutils
package. sudo apt-get install python-distutils
should suffice.
you can use sudo apt-get install python3-distutils
by root permission.
i believe it worked here