Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3 setuptools on mac

I've installed Python 3.2 on my Mac, and I want to install some packages using setuptool's easy_install.

Alas, the only version of easy_install I have are (using command-line autocomplete):

easy_install      easy_install-2.5  easy_install-2.6

How can I install packages for Python 3.2?

Addendum

I've followed Thomas K's advice:

$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py

But no luck, easy_install still installs Python 2.6 packages:

$ easy_install beautifulsoup
Searching for beautifulsoup
Best match: BeautifulSoup 3.2.0
Processing BeautifulSoup-3.2.0-py2.6.egg

How do I force easy_install to retrieve Python 3.2 packages instead?

like image 457
Adam Matan Avatar asked Jan 30 '12 14:01

Adam Matan


People also ask

How do I install Python 3 setuptools?

Follow the below steps to install the Setuptools package on Linux using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.

How do I get Python setuptools?

Type "cmd" in the search bar and hit Enter to open the command line. Type “ pip install setuptools ” (without quotes) in the command line and hit Enter again. This installs setuptools for your default Python installation. The previous command may not work if you have both Python versions 2 and 3 on your computer.

How do I fix Importerror No module named setuptools?

The most likely reason is that Python doesn't provide setuptools in its standard library. You need to install it first! Before being able to import the Pandas module, you need to install it using Python's package manager pip . Make sure pip is installed on your machine.


2 Answers

You need to install setuptools - or rather, the fork called 'distribute', since the original setuptools doesn't support Python 3.

There are instructions here: http://pypi.python.org/pypi/distribute#installation-instructions

like image 109
Thomas K Avatar answered Nov 22 '22 23:11

Thomas K


Like so:

$ curl -O http://python-distribute.org/distribute_setup.py
$ python3.2  distribute_setup.py
        ^^^

Or even:

$ curl -O http://python-distribute.org/distribute_setup.py
$ /the/path/to/the/python/where/you/want/it/installed/bin/python distribute_setup.py
like image 26
Lennart Regebro Avatar answered Nov 23 '22 01:11

Lennart Regebro