未在heroku服务器中安装枕头

时间:2018-09-05 14:35:33

标签: python django heroku

在我的Procfile中包含命令“ release:python manage.py migration”之后,将文件推送到heroku时出现以下错误:

Cannot use ImageField because Pillow is not installed.
remote:         HINT: Get Pillow at https://pypi.org/project/Pillow/ or run 
command "pip install Pillow".

然后我将枕头添加到我的Pipfile中:

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true


[packages]

django = "*"
gunicorn = "*"
django-heroku = "*"
django-crispy-forms = "*"
django-multiselectfield = "*"
django-session-timeout = "*"
Pillow = "*"


[requires]

python_version = "3.6"

我确实运行了命令“ git add Pipfile Pipfile.lock”,并推送到heroku,错误仍然存​​在。

1 个答案:

答案 0 :(得分:0)

原来,我忘记了运行命令“ pipenv lock”将软件包写入我的Pipfile.lock。