Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 安装psycopg2==2.6.1时出错_Python_Heroku - Fatal编程技术网

Python 安装psycopg2==2.6.1时出错

Python 安装psycopg2==2.6.1时出错,python,heroku,Python,Heroku,我想跑 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

我想跑

 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

最后

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,作为在Heroku上部署我的应用程序所需的requirement.txt文件的一部分。
有没有办法修复它?

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

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

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