我正在運行安裝了Pythons 2.5-2.7的Mac OSX 10.7.5。我的應用程序的一個依賴項是newrelic 1.9.0.13(位於here)。當我爲Python 2.6或2.7進行引導和構建時,一切都完美無瑕;但不是當我指定2.5:構建失敗w/Python 2.5
[buildout]
...
python = python
[python]
executable = /usr/bin/python2.5
根據該結構,運行附加件失敗,出現以下錯誤:
Installing newrelic.
Getting distribution for 'newrelic==1.9.0.13'.
newrelic/lib/simplejson/_speedups.c: In function ‘encoder_listencode_obj’:
newrelic/lib/simplejson/_speedups.c:2263: warning: comparison of distinct pointer types lacks a cast
newrelic/lib/simplejson/_speedups.c:2263: warning: passing argument 2 of ‘PyType_IsSubtype’ from incompatible pointer type
zip_safe flag not set; analyzing archive contents...
newrelic.admin: module references __file__
newrelic.console: module references __file__
newrelic.bootstrap.sitecustomize: module references __file__
newrelic.core.environment: module references __file__
newrelic.core.thread_profiler: module references __file__
newrelic.lib.__init__: module references __path__
While:
Installing newrelic.
Getting distribution for 'newrelic==1.9.0.13'.
Error: Couldn't install: newrelic 1.9.0.13
easy_installing壓縮包直接產生相同的消息,然而,安裝成功。這不是特定於newrelic包的;如果我刪除了這個依賴關係,PIL也會發生同樣的情況(同樣,只有在使用Python 2.5時)。
如果我使用分發相反,我跑擴建時得到一個不同的錯誤:
Traceback (most recent call last):
File "./bin/buildout", line 17, in <module>
import zc.buildout.buildout
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py", line 40, in <module>
import zc.buildout.download
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/download.py", line 20, in <module>
from zc.buildout.easy_install import realpath
File "/Users/mjt/.buildout/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/easy_install.py", line 75, in <module>
pkg_resources.Requirement.parse('setuptools')
AttributeError: 'NoneType' object has no attribute 'location'
(我不知道這是否是相關的,我包括在情況下,它可能是。)
爲什麼軟件包無法安裝,我該如何解決?
一對夫婦的注意事項:發生
- 錯誤我是否有使用處方(zc.recipe.egg)包或在我的setup.py
- 包是的
install_requires
名單列出來成功下載;安裝過程中發生錯誤。 - 相同的配置工作,而不改變在Python 2.6和2.7
謝謝!