Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install python distutils

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 installation. When I run install script for django, I get

amitoj@ninja:~/Django-1.2.1$ python setup.py install Traceback (most recent call last):   File "setup.py", line 1, in <module>     from distutils.core import setup ImportError: No module named distutils.core 

I'm stumped. All the articles on internet tell me how to install modules using distutils. But how do I get distutils itself? Can anyone point me to the archive for distutils? I looked in /usr/lib/local/python2.5, /usr/lib/python2.5 etc, and as expected there is no distutils to be found.

like image 741
Neo Avatar asked Sep 28 '10 07:09

Neo


People also ask

What is distutils package Python?

The distutils package provides support for building and installing additional modules into a Python installation. The new modules may be either 100%-pure Python, or may be extension modules written in C, or may be collections of Python packages which include modules coded in both Python and C.


1 Answers

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 
like image 50
ettanany Avatar answered Oct 15 '22 06:10

ettanany