2013-11-04 19 views
10

我在嘗試在osx 10.9 Mavericks上安裝discount軟件包時遇到了很多問題。我正在使用django框架。不能使用pip安裝摺扣:錯誤:命令'cc'失敗,退出狀態爲1

我的步驟是:(雖然具有的​​virtualenv激活):

pip install discount 

然後我得到:

. 
. 
. 

1 error generated. 

error: command 'cc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
Command /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/bin/python -c "import setuptools;__file__='/Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/build/discount/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/4b/smwv2y_s32z044brp6t__ssh0000gp/T/pip-65i7x3-record/install-record.txt --single-version-externally-managed --install-headers /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/include/site/python2.7 failed with error code 1 in /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/build/discount 
Storing complete log in /Users/KaeserMic/.pip/pip.log 

下面是完整的日誌:

https://gist.github.com/MichaelKaeser/7302829

事情我做過:

  • 更新蟒蛇
  • 更新PIP
  • 更新的virtualenv
  • 更新自制

任何想法如何解決這個問題呢? 在此先感謝。

+0

'cc'是一個C編譯器。你有沒有安裝C編譯器? – darthbith

+0

(編輯完整的日誌鏈接,順便說一句)此編譯器是否不附帶xcode命令行工具?如果不是,我應該安裝什麼? – MichaelKaeser

+0

嗯,根據你的日誌,它似乎能夠找到C編譯器。所以我不確定了!錯誤是因爲'未終止的條件指令'而出現的......您似乎也缺少一些依賴項......'markdown需要strcasecmp()或stricmp()'。試試Google搜索這些東西?對不起,我不能進一步幫助:-)這些在你的日誌文件的行255和102,順便說一句。 – darthbith

回答

21

嘗試:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install discount

這似乎這裏提到要與LLVM的問題的XCode 5.1:Can't install mysql gem on OS X

+1

請注意任何複製/貼圖的OP命令包的'pip install'命令在該命令的末尾。如果在安裝其他軟件時遇到此錯誤,則可能需要進行編輯。 –

+0

它幫助我在Mac OS X 10.9上安裝水母。謝謝! – andi

+0

幫我安裝scrapy,謝謝 – rishiehari

0

如果在終端中輸入gcccc,是否會輸出錯誤?你有沒有安裝Xcode?

xcode-select.... 

如果是這樣,Mac Os Mavericks應該提醒您安裝Xcode命令行工具。

+0

是的,它輸出一個錯誤:'鐺:錯誤:沒有輸入文件'。但我確實安裝了Xcode 5.0.1版 – MichaelKaeser

+0

由於沒有輸入文件,這個錯誤是正常的。我猜,cc'默認安裝在你的mac上。無論如何,只需谷歌的'Xcode命令行工具10.9'並安裝它們。 – moenad

+0

只需重新安裝'Xcode和Xcode命令行工具'。仍然不起作用... – MichaelKaeser

相關問題