how to install setuptools in mac

38,225
  1. Download ez_setup.py module from https://pypi.python.org/pypi/setuptools
  2. Open a Terminal.
  3. cd to the directory where you put the ez_setup.py.
  4. Type python ez_setup.py and run it.
  5. You should have it then.
Share:
38,225
Sascuash
Author by

Sascuash

I'm about to finish university and want to jump to the real world as programmer. I still have a lot to learn but I really want to improve and share knowledge.

Updated on July 17, 2022

Comments

  • Sascuash
    Sascuash almost 2 years

    I'm trying to install via pip some libraries but I'm having some problems.

    When I try to install some of them I require for my project I get this message:

    $ sudo pip install dj-database-url==0.2.0
    Downloading/unpacking dj-database-url==0.2.0
      Downloading dj-database-url-0.2.0.tar.gz
    Cleaning up...
    setuptools must be installed to install from a source distribution
    

    It also happens when trying to install distribute==0.6.24

    Any ideas?

  • Marko Gresak
    Marko Gresak about 9 years
    I'm not sure if this was on the page at the time of this answer, but the section Unix including Mac OS X (curl) provides a command curl https://bootstrap.pypa.io/ez_setup.py -o - | python, which does exactly as described in answer, just with a single action and without having to download/remove the file explicitly. AFAIK curl is pre-installed on every Mac OS X system.
  • sarfarazsajjad
    sarfarazsajjad over 8 years
    curl https://bootstrap.pypa.io/ez_setup.py -o - | python gives me error File "<stdin>", line 1 <html><body><h1>503 Service Unavailable</h1> ^ SyntaxError: invalid syntax
  • brian d foy
    brian d foy over 4 years
    This method is now deprecated: github.com/pypa/setuptools/issues/581