how to install python distutils

前端 未结 11 1241
情深已故
情深已故 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:31

    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.

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

    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

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

    You can try installing Python 2.6,

    sudo apt-get install python2.6

    This should install the latest Python and also distutils package.

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

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

    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.

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