AWS Elastic Beanstalk 中的 Python : Private package dependencies

标签 python flask amazon-elastic-beanstalk

我想在 beantalk 上部署一个 Python Flask 应用程序。

应用程序依赖于外部包(例如 geopy )和内部包(例如 adam_geography)。

manual

Create a requirements.txt file and place it in the top-level directory of your source bundle.

这可能会获取 geopy及其依赖项,但不会获取 adam_geography,它可从我的 VPC 内的自定义存储库中获得。

如何在 Beanstalk 应用程序中指定/上传私有(private)的内部 Python 包依赖项?

最佳答案

1) 拷贝内部Python包到服务器

2) 使用 Pip 的“可编辑安装”功能安装私有(private)包:

pip install -e path/to/SomeProject

http://pip.readthedocs.org/en/latest/reference/pip_install.html#editable-installs

关于AWS Elastic Beanstalk 中的 Python : Private package dependencies,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25367732/

相关文章:

python - 当我使用对象名称时,我得到 'DeferredAttribute' 对象没有属性 'get'

python - 构建时如何强制 python 轮子特定于平台?

python - 在已部署的 Web 应用程序上调用 shell 命令时出现意外行为

python-3.x - Flask jsonify 是否支持 UTF-8?

amazon-web-services - 如何通过 Cloudformation 在 Beanstalk 实例上获取 SSL 证书

python - 多个 softmax 分类(Keras)

python - 将字典的字典转换为 DataFrame Python

python - 如何设置Zappa直接调用lambda函数?

php - AWS Elastic Beanstalk + Laravel、Nginx 配置

scala - Elastic BeanStalk Docker应用程序,写入本地文件