我一直在關注kennethlove的屏幕錄像,標題爲"Getting Started with django"。我被困在「第6集:泛型視圖比名牌更便宜」。我正在嘗試安裝需要「Mercurial」的「django-annoying」。構建Mercurial需要Python頭文件
即時通訊使用OSX 10.8.2,當我在終端上運行:pip install mercurial
我收到下面的消息。
Downloading/unpacking mercurial
Downloading mercurial-2.3.2.tar.gz (3.6MB): 3.6MB downloaded
Running setup.py egg_info for package mercurial
Python headers are required to build Mercurial
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/mercurial.egg-info
writing pip-egg-info/mercurial.egg-info/PKG-INFO
writing top-level names to pip-egg-info/mercurial.egg-info/top_level.txt
writing dependency_links to pip-egg-info/mercurial.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/mercurial.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Python headers are required to build Mercurial
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/gth158a/Sites/official/poll/build/mercurial
Storing complete log in /Users/gth158a/.pip/pip.log
我一直在尋找一個解決方案,我已經找到了最接近的是有人having the same issue in Ubuntu但他提出的解決方案並不在我的OSX的情況下適用。
從我的研究中,我瞭解到引用的頭文件是構建應用程序的「C頭文件」。我已經安裝了我在pip中找到的包含C頭文件的軟件包,但沒有成功。如果您能指出我正確的方向,我將不勝感激。
在XCode 5中,不能再使用上述菜單安裝命令行工具。然而,從控制檯執行'xcode-select --install'會安裝命令行工具。 – Pascal