Amazon Elastic Beanstalk上的Psycopg2

爱德华多:

我正在尝试上传将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。

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Amazon ec2和AWS Elastic Beanstalk之间的区别

具有Docker容器的Amazon Elastic Beanstalk与EC2实例

在Amazon Elastic Beanstalk上使用Docker部署Django

SailsJS在Amazon Elastic beantalk上不稳定

同时在Amazon Elastic Beanstalk上部署到多个环境

启动firefox硒Webdriver拒绝了Amazon Elastic Beanstalk的权限

带有Amazon ECR Docker映像的AWS Elastic Beanstalk

Amazon Elastic Beanstalk配置问题

更新Amazon RDS SSL / TLS证书-Elastic Beanstalk

Elastic Beanstalk上的PostgreSQL(Amazon Linux 2)

Elastic Beanstalk:Amazon Linux 2平台上的日志任务自定义

Amazon Linux 2(Elastic Beanstalk)的Laravel工匠修补匠

在新的Amazon Linux 2上的AWS Elastic Beanstalk中创建系统服务

在Amazon Elastic Beanstalk上安装Anaconda以在Django应用程序中使用

静态文件不起作用Django Elastic Beanstalk Amazon Linux 2

AWS Elastic Beanstalk Amazon Linux 2-如何设置自定义NodeCommand

带有在64位Amazon Linux 2 / 3.2.2和Dockerrun.aws.json v3上运行的Docker的Elastic Beanstalk

在Amazon Elastic Beanstalk上守护PHP脚本(SQS侦听器)

Amazon Elastic Beanstalk内部和互联网访问

Amazon Elastic Transcoder与FFMPEG

Amazon EC2,Elastic Beanstalk:我的图像消失了

在Amazon Elastic Beanstalk上运行Python的问题

带Elastic Beanstalk的Amazon DynamoDB表未设置正确的参数

跨Amazon Elastic Beanstalk节点共享数据

连接到Amazon Elastic Beanstalk上的数据库

如何卸载 Amazon Elastic Beanstalk 命令行界面?

Amazon Elastic Beanstalk 配置 – 非内置 php.ini 配置

如何为在 64 位 Amazon Linux 2 上运行的 Elastic Beanstalk Python 3.7 项目安装节点包?

AWS Elastic Beanstalk 无法使用 requirements.txt Git Pip 安装 psycopg2