gpt4 book ai didi

django - 在 Heroku 上手动删除 Python 包

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

我正在运行 heroku push master ,得到了这个:

 ----- Python app detected
----- No runtime.txt provided; assuming python-2.7.3.
----- Using Python runtime (python-2.7.3)
----- Installing dependencies using Pip (1.2.1)
Downloading/unpacking Django-1.5c2 from https://www.djangoproject.com/download/1.5c2/tarball (from -r
requirements.txt (line 1))
Cannot determine compression type for file /tmp/pip-rYIGHS-unpack/tarball.ksh
Running setup.py egg_info for package Django-1.5c2

Installing collected packages: Django-1.5c2
Running setup.py install for Django-1.5c2
changing mode of build/scripts-2.7/django-admin.py from 600 to 755

changing mode of /app/.heroku/python/bin/django-admin.py to 755


========
WARNING!
========

You have just installed Django over top of an existing
installation, without removing it first. Because of this,
your install may now include extraneous files from a
previous version that have since been removed from
Django. This is known to cause a variety of problems. You
should manually remove the

/app/.heroku/python/lib/python2.7/site-packages/django

directory and re-install Django.

Successfully installed Django-1.5c2

如何删除以前的 Django 包?

更新:
我的要求.txt:
https://www.djangoproject.com/download/1.5c2/tarball/**#egg=django**
South==0.7.6
argparse==1.2.1
distribute==0.6.24
dj-database-url==0.2.1
psycopg2==2.4.6
wsgiref==0.1.2
PIL==1.1.7

粗体文本修复了上述警告。

更新 2:
由于 Django 1.5 正式发布,我只是使用了 pip freeze:
Django==1.5
South==0.7.6
argparse==1.2.1
distribute==0.6.24
dj-database-url==0.2.1
psycopg2==2.4.6
wsgiref==0.1.2
PIL==1.1.7

最佳答案

我遇到了 Heroku 缓存损坏的包并且无法将它们取出的问题。 Python buildpack 应该支持刷新此缓存(CACHE_DIR),但它没有。

有一个解决方法:关注 these instructions例如,将您的 Python 运行时更改为 3.3.0(您的应用程序是否真的支持 Python 3 并不重要)。然后将其更改回默认值。更改 Python 运行时然后部署的行为将强制 buildpack 完全删除缓存。据我所知,这是目前删除缓存的唯一实用方法。

关于django - 在 Heroku 上手动删除 Python 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15046378/

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