[英]Using BigQuery with AppEngine conflicting in package google
I am trying to add BigQuery to a Django-AppEngine project and I am finding a lot of problems in doing that since the google library for BigQuery use a package named google
and this folder is already in use for AppEngine purposes. 我正在尝试将BigQuery添加到Django-AppEngine项目中,我发现这样做有很多问题,因为BigQuery的谷歌库使用名为google
的软件包,此文件夹已用于AppEngine目的。 What I find now is that, if I install BigQuery, it will overwrite this package and then nothing works! 我现在发现的是,如果我安装BigQuery,它将覆盖这个包,然后没有任何作用!
Is there maybe someone who faced this problem before and has any idea how to solve this? 是否有人之前遇到过这个问题并且有任何想法如何解决这个问题?
It is some way to combine existing folders using pip or something else? 这是使用pip或其他东西组合现有文件夹的一些方法吗?
Thanks!! 谢谢!!
Possible Solution: 可能解决方案
For those who are facing the same problem, I was able to find a solution which was not too bad. 对于那些面临同样问题的人,我能够找到一个不太糟糕的解决方案。 Just creating an appengine_config.py
file and adding them there: 只需创建一个appengine_config.py
文件并将其添加到那里:
from google.appengine.ext import vendor vendor.add('sitepackages/prod')
...but still looking for a better solution. ......但仍在寻找更好的解决方案。
*note: all my third party libraries are placed there instead of in a lib
folder like Google says. *注意:我所有的第三方图书馆都放在那里,而不是谷歌所说的lib
文件夹。
I could solved the problem I was facing by adding an extra appengine_config.py
file containing this two lines: 我可以通过添加包含以下两行的额外appengine_config.py
文件来解决我面临的问题:
from google.appengine.ext import vendor vendor.add('sitepackages/prod')
This file is going to be automatically called by google appengine
adding the libs on sitepackages/prod
(in this case) to the libs on our virtualenv
. 此文件将由google appengine
自动调用,将sitepackages/prod
上的库(在本例中)添加到virtualenv
上的库中。
Thanks to @snakecharmerb for showing me the way to do this. 感谢@snakecharmerb向我展示了这样做的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.