我在我的appengine項目中安裝了google-cloud-storage到我的lib
文件夾。然後,在我的appengine_config.py
文件,我有:在appengine標準環境中導入和使用google-cloud-storage模塊
import sys import os.path sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib'))
appengine_config.py
和lib
(目錄),是兒童在同一個父目錄。
因此,我期望appengine會加載庫。但是,當我在我的main.py
文件(如from google.cloud import storage
)中執行導入時,出現類似如下的導入錯誤:ImportError: No module named google.cloud.storage
。
是否有可能在appengine標準環境中使用這樣的第三方庫。如果是,如何?如果不是,你會不會解釋爲什麼?