按照安装说明here操作时,^{<your_app_directory>
是什么
pip install GoogleAppEngineCloudStorageClient -t <your_app_directory/lib>
是吗?在
我试过:
但是我得到了:
ImportError:没有名为cloudstorage的模块
如果我尝试:
^{pr2}$以及:
重要错误:没有命名的模块lib.云存储在
如果我尝试:
import lib.cloudstorage as gcd
所有这些。在
例如
>>> os.listdir("/applications/lib")
['cloudstorage', 'GoogleAppEngineCloudStorageClient-1.9.15.0-py2.7.egg-info']
>>> import lib.cloudstorage
Traceback (most recent call last):
File "<stdin>", line 1, in <module> ImportError: No module named lib.cloudstorage
>>>
<your_app_directory>
是包含app.yaml
文件的文件夹的路径。在YAML文件指定一个包含GAE
handlers
的脚本文件。此脚本文件、YAML文件和依赖项需要打包到upload的文件夹中。在我使用这个文件夹结构:
Note: script attribute will point to src.main.application
__init__.py
Contains a variable called application
__init__.py
为了帮助python在子文件夹中查找模块,比如使用
import cloudstorage as gcs
,以下代码在main.py
文件中很有用:我不确定最后是不是这样做的,但在执行以下操作后,我不再收到导入错误:
相关问题 更多 >
编程相关推荐