简体   繁体   English

gcloud FileNotFoundError lib64

[英]gcloud FileNotFoundError lib64

Why do I get the following error when trying to deploy to Google Cloud App Engine?为什么在尝试部署到 Google Cloud App Engine 时会出现以下错误?

gcloud crashed (FileNotFoundError): [Errno 2] No such file or directory: '/home/.../.../venv/lib64'

That directory exists on my local machine but the only reference to lib64 in my code is in the .gitignore file.该目录存在于我的本地机器上,但我的代码中对lib64的唯一引用是在 .gitignore 文件中。 The Error seems to be connected to my environment, but I'm not sure how to fix this.该错误似乎与我的环境有关,但我不确定如何解决此问题。 Any ideas?有任何想法吗?

Additional Details: The error only occurs when I try to deploy the code from one specific branch.其他详细信息:仅当我尝试从一个特定分支部署代码时才会发生该错误。 I've deployed other branches from the developer that created this problem branch and haven't had any issues.我已经从创建这个问题分支的开发人员那里部署了其他分支,并且没有任何问题。

The Codebase is Python/Django.代码库是 Python/Django。 and this particular problem branch runs great on my local machine, It only gives me trouble when I try to deploy it to my dev server on Google App Engine.这个特殊的问题分支在我的本地机器上运行良好,只有当我尝试将它部署到我的 Google App Engine 上的开发服务器时才会给我带来麻烦。

The only thing that is reproducible in this error is this particular branch.此错误中唯一可重现的是此特定分支。 I just unsure where to start looking for WHY this is happening.我只是不确定从哪里开始寻找为什么会发生这种情况。

The error is given because your app is not able to locate the lib64 in the directory of virtual environment you set locally.报错是因为您的应用程序无法在您本地设置的虚拟环境目录中找到 lib64。

In App Engine to install the dependencies of your app, you need to to place it in a file called requirements.txt.App Engine中安装您的应用程序的依赖项,您需要将它放在一个名为 requirements.txt 的文件中。

You can install all the dependencies your app has by going to your project directory and install them with pip command:您可以通过转到项目目录并使用 pip 命令安装应用程序的所有依赖项:


cd YOUR_PROJECT
pip install  -r requirements.txt

Also please have a look into the Running Django in App Engine Official Documentation .另请查看App Engine 官方文档中Running Django

The Problem: Make sure your fellow devs have their virtual environment folder listed in their .gitignore file问题:确保你的开发伙伴在他们的 .gitignore 文件中列出了他们的虚拟环境文件夹

Clue #1: This problem was only occurring on a single branch coming from another employee/dev线索#1:这个问题只发生在来自另一个员工/开发人员的一个分支上

Clue #2: 'venv' is not the name of my own virtual environment线索#2:'venv' 不是我自己的虚拟环境的名称

As soon as clue #2 dawned on me, I went looking and saw that my developer somehow committed this branch with his own /venv/ folder.我一想到线索#2,我就去看,发现我的开发人员不知何故用他自己的/venv/文件夹提交了这个分支。 it should have been part of his .gitignore, but apparently wasn't.它应该是他的 .gitignore 的一部分,但显然不是。 As soon as I deleted his erroneous '/venv/' file off of my dev server, then I was able to upload just fine.一旦我从我的开发服务器上删除了他错误的“/venv/”文件,我就可以正常上传了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM