how to install python distutils

前端 未结 11 1240
情深已故
情深已故 2021-01-30 02:42

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

相关标签:
11条回答
  • 2021-01-30 03:17

    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
    
    0 讨论(0)
  • 2021-01-30 03:20

    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
    
    0 讨论(0)
  • 2021-01-30 03:23

    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.

    0 讨论(0)
  • 2021-01-30 03:23

    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
    
    0 讨论(0)
  • 2021-01-30 03:27

    You can install the python-distutils package. sudo apt-get install python-distutils should suffice.

    0 讨论(0)
  • 2021-01-30 03:30

    you can use sudo apt-get install python3-distutils by root permission.

    i believe it worked here

    0 讨论(0)
提交回复
热议问题