繁体   English   中英

安装psycopg2 == 2.6.1时出错

[英]Error in installing psycopg2==2.6.1

我正在尝试跑步

 pip install psycopg2==2.6.1

但是我得到了错误

In file included from psycopg/psycopgmodule.c:27:0:
./psycopg/psycopg.h:30:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 Failed building wheel for psycopg2

最后

Command "/home/arpan/ArpanMangal/virtualenvmnts/Heroku/heroku-arpan/bin/python
-u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Hs26Hx/psycopg2/
setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace
('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record /tmp/pip-Y6fwIc-record/install-record.txt --single-version-externally
-managed --compile --install-headers /home/arpan/ArpanMangal/virtualenvmnts/
Heroku/heroku-arpan/include/site/python2.7/psycopg2" failed with error code 1
in /tmp/pip-build-Hs26Hx/psycopg2

我正在安装psycopg2 = 2.6.1作为requirment.txt文件的一部分,以在Heroku上部署我的应用程序。 有什么办法可以解决?

您需要安装以下依赖项sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM