Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Setuptools, easy_install setup mac

Tags:

python

Okay, so I'm not sure at all what is going on here. I just got my MAC, and I am trying to download and install setuptools, so I can download different python packages (using easy_install). So, following the instructions here (http://pypi.python.org/pypi/setuptools):

  1. I currently have version 2.6
  2. I downloaded the following egg: setuptools-0.6c11-py2.6.egg (md5)
  3. I placed the file on my desktop (File Name: setuptools-0.6c11-py2.6.egg.sh)
  4. I navigate to the desktop on the directory, and use the following command line, as suggested by the above link: sh setuptools-0.6c11-py2.6.egg
  5. I get an error: No such file or directory, so then I use this other command sh setuptools-0.6c11-py2.6.egg.sh
  6. Then, I get the following error: setuptools-0.6c11-py2.6.egg.sh is not the correct name for this egg file. Please rename it back to setuptools-0.6c11-py2.6.egg and try again.

I am really not sure at all what to do here. Any help would be appreciated! Thanks!

like image 982
user487588 Avatar asked Nov 06 '10 03:11

user487588


People also ask

How do I install Python setuptools package?

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.

Is setuptools installed by default with Python?

Even in a vanilla version of Python 3.7. 6 (installed via pyenv ), the packages installed by default are both pip and setuptools .

What does Python setuptools setup do?

setuptools allows you to install a package without copying any files to your interpreter directory (e.g. the site-packages directory). This allows you to modify your source code and have the changes take effect without you having to rebuild and reinstall.


1 Answers

edit Try this from a command line

Here is an easier thing to do that might work better for you. Open a terminal (Applications->Utilities->Terminal) and run this as a shell script. You can also run the individual commands.

#!/bin/sh

cd ~

# Downloads python setuptools for 2.6
curl -o setuptools-0.6c11-py2.6.egg http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086

# installs it, will probably prompt you for password
sudo sh setuptools-0.6c11-py2.6.egg

# clean up and delete egg
rm setuptools-0.6c11-py2.6.egg

Stuff below was original response

I just did this on my own Mac machine, and installation went off without a problem. Did you open a terminal to do this?

I downloaded setuptools to my Downloads folder, and then opened a terminal, and did this:

> cd ~/Downloads
> sudo sh setuptools-0.6c11-py2.6.egg 
Password:
Processing setuptools-0.6c11-py2.6.egg
Removing /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /Library/Python/2.6/site-packages
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.6 script to /usr/local/bin

Installed /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
like image 135
逆さま Avatar answered Oct 12 '22 23:10

逆さま