相关疑难解决方法(0)

错误:没有名为psycopg2.extensions的模块

我正在尝试为我的django项目建立一个PostgreSQL数据库,我相信我现在已经完成了,这要归功于我为django项目设置postgreSQL数据库时遇到的问题.我现在正试图在终端中运行命令'python manage.py runserver'来获取我的本地主机但是当我运行命令时,我看到这个响应...

Error: No module named psycopg2.extensions
Run Code Online (Sandbox Code Playgroud)

我不确定这意味着什么 - 我试图下载psycopg2但似乎找不到使用自制软件下载psycopg2的方法.我已经尝试过easy_install,pip install和sudo但是所有的返回错误都是这样的......

Downloading http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz
Processing psycopg2-2.4.5.tar.gz
Writing /tmp/easy_install-l7Qi62/psycopg2-2.4.5/setup.cfg
Running psycopg2-2.4.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l7Qi62/psycopg2-2.4.5/egg-dist-tmp-PBP5Ds
no previously-included directories found matching 'doc/src/_build'
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?

python django postgresql psycopg2

70
推荐指数
7
解决办法
12万
查看次数

标签 统计

django ×1

postgresql ×1

psycopg2 ×1

python ×1