我的Django项目在迁移时遇到了问题。我在命令行中运行
python3 manage.py migrate由于某些原因,我得到了这个错误
ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'但是我已经检查了psycopg2的安装,它似乎是可以的
(myenv) (base) Elenas-MacBook-Air:myenv elenaorlova$ pip install
psycopg2==2.7.5
DEPRECATION: Python 2.7 reached the end of its life on January
1st, 2020. Please upgrade your Python as Python 2.7 is no longer
maintained. pip 21.0 will drop support for Python 2.7 in January
2021. More details about Python 2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-
process/#python-2-support
Requirement already satisfied: psycopg2==2.7.5 in
./lib/python2.7/site-packages (2.7.5)你知道这个问题的原因是什么吗?我已经重新安装了psycopg2好几次了,包括手动安装。将非常感谢您的帮助!
发布于 2020-05-20 21:14:54
我也有同样的问题。请执行以下操作:
pip install psycopg2-binary https://stackoverflow.com/questions/61912762
复制相似问题