我正在尝试上传将Psycopg2用于Amazon Elastic Beanstalk的项目(在python中)。我正在使用包含我的项目和requirements.txt文件的zip文件来执行此操作。
但我收到此错误:
下载/解压缩psycopg2> = 2.4.6(从-r /opt/python/ondeck/app/requirements.txt(第3行))运行包psycopg2的setup.py egg_info错误:找不到pg_config可执行文件。
Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. Complete output from command python setup.py egg_info: running egg_info
我如何在亚马逊上解决这个问题?
在您的容器中需要postgresql-devel。使用内容创建文件“ .ebextensions / packages.config”:
packages:
yum:
postgresql94-devel: []
替换94
为所需postgresql94-devel
的任何版本的postgres。例如,postgresql93-devel
对于postgres 9.3。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句