且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Dokku编译错误-django.core.exceptions.ImproperlyConfigured:加载psycopg2模块时出错:没有名为'psycopg2'的模块

更新时间:2022-01-31 22:19:10

尝试使用此docker命令安装psycopg2适配器

docker-compose exec web pipenv install psycopg2-binary==2.8.3

如果您愿意,您也可以提及自己的特定版本.

you can also mention your own specific version if you like.

如果仍然出现错误,则表示容器未正确停止.使用以下命令将其停止

if you still get an error it means the container is not stopped properly. Use below command to stop it

docker-compose down

然后在安装psycopg2之后启动它

and then start it after installing psycopg2

docker-compose up