开发者

Python Setuptools, easy_install setup mac

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 u开发者_开发问答se 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!


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


Try this

mv setuptools-0.6c11-py2.6.egg.sh setuptools-0.6c11-py2.6.egg
sh setuptools-0.6c11-py2.6.egg 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜