gpt4 book ai didi

python - 在 dotcloud 上构建 mysql-python 时遇到问题 : needs distribute >= 0. 6.28

转载 作者:行者123 更新时间:2023-12-01 05:45:45 25 4
gpt4 key购买 nike

我突然在 dotcloud 上构建 Python/Django 应用程序时遇到了麻烦。看来MySQL-python需要distribute >= 0.6.28。我的requirements.txt指定distribute==0.6.36,但这被忽略。 Dotcloud 似乎正在使用 0.6.10 代替。有没有办法升级正在使用的分发包?

需求.txt

Django==1.5.1
MySQL-python==1.2.4
PIL==1.1.7
Pygments==1.6
South==0.7.6
anyjson==0.3.3
boto==2.8.0
distribute==0.6.36
django-background-task==0.1.6
django-extensions==1.1.1
django-mptt==0.5.5
django-social-auth==0.7.22
django-storages==1.1.8
django-tinymce==1.5.1b4
djangorestframework==2.2.6
docutils==0.10
httplib2==0.8
importlib==1.0.2
oauth2==1.5.211
ordereddict==1.1
python-dateutil==1.5
python-openid==2.2.5
pytz==2013b
selenium==2.32.0
six==1.3.0
wsgiref==0.1.2

构建者成绩单

16:43:46.608001: [www] I am snapshotsworker_00/ec2-23-22-131-20, and I will be your builder today.
16:44:02.918066: [www] Requirement already satisfied (use --upgrade to upgrade): Django==1.5.1 in /opt/ve/2.6/lib/python2.6/site-packages (from -r requirements.txt (line 1))
16:44:02.918522: [www] Downloading/unpacking MySQL-python==1.2.4 (from -r requirements.txt (line 2))
Downloading MySQL-python-1.2.4.zip (113Kb): 113Kb downloaded13Kb):
16:44:23.028019: [www] Storing download in cache at /home/dotcloud/.pip-cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4.zip
16:44:23.028471: [www] Running setup.py egg_info for package MySQL-python
16:44:23.808020: [www] The required version of distribute (>=0.6.28) is not available,
16:44:23.808477: [www] and can't be installed while this script is running. Please
16:44:23.808732: [www] install a more recent version first, using
16:44:23.808985: [www] 'easy_install -U distribute'.
16:44:23.809487: [www] (Currently using distribute 0.6.10 (/opt/ve/2.6/lib/python2.6/site-packages))
16:44:23.828053: [www] Complete output from command python setup.py egg_info:
16:44:23.828490: [www] The required version of distribute (>=0.6.28) is not available,
16:44:23.828999: [www] and can't be installed while this script is running. Please
16:44:23.829503: [www] install a more recent version first, using
16:44:23.830016: [www] 'easy_install -U distribute'.
16:44:23.831304: [www] (Currently using distribute 0.6.10 (/opt/ve/2.6/lib/python2.6/site-packages))
16:44:23.832167: [www] ----------------------------------------
16:44:23.832633: [www] Command python setup.py egg_info failed with error code 2 in /opt/ve/2.6/build/MySQL-python
16:44:23.833106: [www] Storing complete log in /home/dotcloud/.pip/pip.log
16:44:24.598341: [www] -- Build failed: "/home/dotcloud/env/bin/pip install --download-cache=~/.pip-cache -r requirements.txt" failed with return code 1
16:44:24.677501: [www] Build failed for service (www)

最佳答案

我找到了使用 pre-build hook 的解决方法。构建器脚本中给出的 easy_install 建议不起作用,但它确实适用于 pip。以下是详细信息。

dotcloud.yml

www:
type: python
prebuild: ./prebuild
db:
type: mysql

预构建(chmod +x)

pip install --upgrade distribute==0.6.36

关于python - 在 dotcloud 上构建 mysql-python 时遇到问题 : needs distribute >= 0. 6.28,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16174994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com