簡體   English   中英

Python Setuptools,easy_install setup mac

[英]Python Setuptools, easy_install setup mac

好的,所以我不確定這里發生了什么。 我剛拿到我的MAC,我正在嘗試下載並安裝setuptools,所以我可以下載不同的python包(使用easy_install)。 所以,按照這里的說明(http://pypi.python.org/pypi/setuptools):

  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. 我收到一個錯誤:沒有這樣的文件或目錄,所以我使用另一個命令sh setuptools-0.6c11-py2.6.egg.sh
  6. 然后,我收到以下錯誤:setuptools-0.6c11-py2.6.egg.sh不是此egg文件的正確名稱。 請將其重命名為setuptools-0.6c11-py2.6.egg,然后重試。

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

編輯從命令行嘗試此操作

這是一個更容易做的事情,可能對你更好。 打開終端(Applications-> Utilities-> Terminal)並將其作為shell腳本運行。 您還可以運行各個命令。

#!/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下載到我的Downloads文件夾,然后打開一個終端,並執行了以下操作:

> 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

試試這個

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM