2010-11-06 119 views
5

好吧,所以我不確定這裏發生了什麼。我剛拿到我的MAC,我正在下載並安裝setuptools,所以我可以下載不同的python軟件包(使用easy_install)。所以,在這裏(http://pypi.python.org/pypi/setuptools)以下的說明:Python Setuptools,easy_install安裝mac

  1. 我現在有2.6版本
  2. 我下載了以下雞蛋:setuptools的-0.6c11-py2.6 .egg(md5)
  3. 我將文件放在我的桌面上(文件名:setuptools-0.6c11-py2.6.egg.sh)
  4. 我導航到目錄上的桌面,並使用以下命令行,如上面的鏈接所示: sh setuptools-0.6c11-py2.6.egg
  5. 我得到一個錯誤:沒有這樣的文件或目錄,所以然後我們e其他命令 sh setuptools-0.6c11-py2.6.egg.sh
  6. 然後,我收到以下錯誤: setuptools-0.6c11-py2.6.egg.sh不是這個蛋的正確名稱文件。 請重新命名爲setuptools-0.6c11-py2.6.egg並重試。

我真的不確定在這裏做什麼。任何幫助,將不勝感激!謝謝!

回答

6

編輯在命令行

這裏是一個容易的事情,可能更好地爲你試試這個。打開終端(應用程序 - >實用程序 - >終端)並將其作爲外殼腳本運行。您也可以運行單個命令。

#!/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 

東西下面是原始響應

我只是做這個我自己的Mac機上,安裝去了沒有問題。你打開一個終端來做到這一點?

我下載setuptools的到我的下載文件夾,然後打開一個終端,這樣做:

> 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 
1

試試這個

mv setuptools-0.6c11-py2.6.egg.sh setuptools-0.6c11-py2.6.egg 
sh setuptools-0.6c11-py2.6.egg 
相關問題