2012-12-05 58 views
0

我正在運行安裝了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

謝謝!

回答

2

新的Bootsrtrap.py被釋放,舊的無法正常工作。

嘗試蟒蛇bootstrap.py -v 1.7.0使正常運行舊的或使用new one

1

@Cyril,您的解決方案工作對我來說太棒了!謝謝。

我已經收到了這個問題,能夠通過交換在一個較新的bootstrap.py文件來修復它,但我的一些開始構建週末神祕故障轉移,在此之際,我困擾到看看bootstrap.py代碼。

我發現的是,如果你不指定版本(zc.buildout版)bootstrap.py將下載最新的,這可能與您的bootstrap.py版本(一個恥辱它couldn」兼容t是LOT關於此更多信息)。

python bootstrap.py --version 1.7 # compatible zc.buildout version number 

我敢說,因爲zc.buildout的Version 2.0剛剛發佈有幾個人會越來越晚此錯誤。有幾個地方可以下載bootstrap.py,但是http://downloads.buildout.org/是官方消息。道德是,如果可以的話,保持最新。