python - AWS Elastic Beanstalk chown PythonPath 错误
问题描述
我正在 AWS 的弹性 beantalk 上部署一个 Web 应用程序,并且遇到了同样的错误:
[StageApplication]. Stop running the command. Error: chown /var/app/staging/venv/bin/python: no such file or directory.
我在我的环境配置中看到了属性PYTHONPATH
::/var/app/venv/staging-LQM1lest/bin
我的应用程序使用命令“python applicaiton.py”在本地运行得非常好。
关于如何解决这个问题的任何建议?
解决方案
确保您没有将本地 venv 推送到您的 EB 引用的 Git Repo。我试图从另一台机器上进行更新,但不小心将它推送到 master,这导致了这个确切的错误。即使在添加到 gitignore 文件后,我也必须使用以下内容将其删除。试一试和/或仔细检查。
git rm -r --cached venv
git commit -m 'Remove the now ignored directory venv'
git push origin master
推荐阅读
- architecture - 基于其他架构修改镜像
- java - Java 正则表达式只允许特定字符
- python - Python:如何从 Path 对象中获取双反斜杠
- inheritance - 在 PyCharm 的 sciview 查看器中查看 numpy.ndarray 子类;这可能吗?
- r - 如何旋转我的海面温度图?
- php - 结束准备好的语句查询(stmt->close)
- pandas - 如何使用 nbconvert 在 jupyter notebook 的 html 输出中添加垂直滚动条?
- c - 在 macOS Catalina 上的 C 中使用 bzlib -“ld:未找到架构 x86_64 的符号”、“clang:错误:链接器命令失败,退出代码为 1”
- python - Python中一系列循环的多处理?
- python - 如何在kivymd MD对话框中创建多个按钮