我試圖在彈性beanstalk實例上安裝peewee軟件包來控制瓶子的應用。我認爲問題在於MySQL-python依賴,但是peewee也不加載。我要求的文件是這樣的:讓peewee在彈性豆杆上工作
bottle==0.11.6
peewee==2.1.1
MySQL-python
我也試過MySQL-python
爲MySQL-python==1.2.4b4
。由於多種原因,我認爲總結了here,這是行不通的; peewee沒有安裝,我在日誌中得到這個錯誤信息:
2013-05-18 06:57:08,407 [INFO] (15947 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2013-05-18 06:57:08,408 [INFO] (15947 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py
2013-05-18 06:57:18,663 [INFO] (15947 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: New python executable in /opt/python/run/venv/bin/python2.6
Not overwriting existing python script /opt/python/run/venv/bin/python (you must use /opt/python/run/venv/bin/python2.6)
Installing distribute..................................................................................................................................................................................................done.
Installing pip................done.
Requirement already satisfied (use --upgrade to upgrade): bottle==0.11.6 in /opt/python/run/venv/lib/python2.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 1))
Downloading/unpacking peewee==2.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
Running setup.py egg_info for package peewee
Downloading/unpacking MySQL-python (from -r /opt/python/ondeck/app/requirements.txt (line 3))
Running setup.py egg_info for package MySQL-python
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.27 (/opt/python/run/venv/lib/python2.6/site-packages/distribute-0.6.27-py2.6.egg))
Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
所以pip不適用於這些軟件包。我非常肯定我可以通過連接到EC2實例並在沒有pip的情況下安裝MySQL-python來解決這個問題,但是在我看來,這將破壞彈性beanstalk的目的,因爲每次啓動新實例時都需要我去並手動修改它。有沒有適合我解決這個問題的方法?我也有同樣的問題,試圖安裝像scipy和matplotlib的東西,廣泛地說,有沒有辦法可以在沒有pip的情況下在彈性beanstalk實例上安裝python包,並且不需要單獨進入每個實例?我應該研究如何製作自定義AMI並將其用於豆莖? 非常感謝, 亞歷克斯
你嘗試運行:「的easy_install -U分發」 – coleifer