小编jer*_*mjt的帖子

即使安装了 psycopg2,在 Heroku 中部署时 ModuleNotFoundError psycopg2

我将我的网站从 sqlite3 迁移到 postgresql。我正在 heroku 中部署我的网站,但是当我执行命令时出现了这个错误 push heroku master

-----> Python app detected
 !     Python has released a security update! Please consider upgrading to python-3.7.3
       Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.7.2
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
       Installing dependencies from Pipfile…
-----> Installing SQLite3
-----> $ python manage.py collectstatic --noinput
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.7/site-packages/django/db/backends/postgresql/base.py", line 20, in <module>
           import psycopg2 as Database
       ModuleNotFoundError: No module named 'psycopg2'
       During handling of the above exception, another …
Run Code Online (Sandbox Code Playgroud)

django heroku wagtail

1
推荐指数
1
解决办法
999
查看次数

标签 统计

django ×1

heroku ×1

wagtail ×1