AWS Elastic Beanstalk chown PythonPath错误 [英] AWS Elastic Beanstalk chown PythonPath error
问题描述
我正在AWS的Elastic beantalk上部署Web应用程序,并且遇到了相同的错误:
I am deploying a web app on AWS's elastic beanstalk and am coming across the same error:
[StageApplication].停止运行命令.错误:chown/var/app/staging/venv/bin/python:没有这样的文件或目录.
我在环境配置中看到以下属性: PYTHONPATH
:/var/app/venv/staging-LQM1lest/bin
I see in my environment configuration the property: PYTHONPATH
: /var/app/venv/staging-LQM1lest/bin
我的应用程序在本地使用"python applicaiton.py"命令运行得很好.
My app runs perfectly fine locally with the command 'python applicaiton.py'.
关于如何解决此问题的任何建议?
Any advice on how I can fix this?
推荐答案
请确保您没有将本地venv推送到EB引用的Git Repo.我试图从另一台计算机进行更新,并无意中将其推向主机,从而导致此确切错误.即使添加到gitignore文件中,我也必须使用以下命令将其删除.试一试和/或仔细检查.
Make sure you aren't pushing your local venv to your EB referenced Git Repo. I was trying to make updates from another machine and accidentally pushed it to master which caused this exact error. I had to use the following to remove it even after adding to gitignore file. Give that a shot and/or double check.
git rm -r --cached venv
git commit -m 'Remove the now ignored directory venv'
git push origin master
这篇关于AWS Elastic Beanstalk chown PythonPath错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!