1

我需要在 Heroku 上运行分发版本 0.6.28。我更新了我的 requirements.txt,但这似乎没有效果。

我正在尝试从需要此更高版本分发包的 tarball 中的模块进行安装。

在部署期间,我只得到这个:

     Running setup.py egg_info for package from http://downloads.sourceforge.net/project/mysql-python/mysql-python-test/1.2.4b4/MySQL-python-1.2.4b4.tar.gz
       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 (/tmp/build_ibj6h3in4vgp/.heroku/venv/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg))
       Complete output from command python setup.py egg_info:
       The required version of distribute (>=0.6.28) is not available,
4

2 回答 2

2

好的,这是一个暂时可行的解决方案。我认为长期修复是 Heroku 升级他们的分发版本。

  1. fork python buildpack:https ://github.com/heroku/heroku-buildpack-python/
  2. 将您需要的要求添加到包中(我将它们放在 bin/compile 中,就在其他 pip install 要求步骤之前)。有关该差异,请参见https://github.com/buildingenergy/heroku-buildpack-python/commit/12635e22aa3a3651f9bedb3b326e2cb4fd1d2a4b
  3. 更改应用的 buildpack:

    heroku 配置:添加 BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git

  4. 再推。它应该工作。
于 2012-11-03T00:34:58.040 回答
-1

尝试在第一次推送时将具有特定版本的分发添加到您的依赖项,然后添加所需的依赖项。

cat requirements.txt
...
distribute==0.6.28
...
git push heroku master
...
cat requirements.txt
...
your deps here
于 2012-10-12T22:43:52.913 回答