为什么我会遇到importerror:安装完模块后找不到模块?

时间:2019-10-22 10:17:08

标签: django postgresql apache2 importerror

我正在从django-sqlite3迁移到postgresql,因此我已经在我的apache2服务器中安装了postgresql和所需的模块(psycopg2)。 我已经正确安装了psycopg2-

>>> import psycopg2
>>> psycopg2.__version__
'2.8.4 (dt dec pq3 ext lo64)'
>>> psycopg2._psycopg.__version__
'2.8.4 (dt dec pq3 ext lo64)'

但是,它会引发如下错误-ImportError:没有名为psycopg2._psycopg的模块(如我的error.log文件中所示)

my error.log file snapshot  我已经搜索了stackoverflow和github上的所有线程,但是找不到任何解决方案。

这是base.py文件,它是错误的来源Line 20 of my basse.py that throws error

0 个答案:

没有答案