使用 pip 安装 Google 云存储客户端库 -- Python GAE

Install Google Cloud Storage Client Library with pip -- Python GAE

我正在尝试使用 pip 为 Google App Engine 安装 Google 云存储客户端库。感谢您提供的任何提示。我的文档说在命令提示符中输入:

pip install GoogleAppEngineCloudStorageClient -t <app_root>

所以我实际上是在输入:

pip install GoogleAppEngineCloudStorageClient -t C:\Program Files (x86)\Google\google_appengine

但我一直收到关于 "Missing distribution spec":

的错误
Exception:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 232, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 305, in run

    name, None, isolated=options.isolated_mode,
  File "C:\Python27\lib\site-packages\pip\req\req_install.py", line 181, in from
_line
    isolated=isolated)
  File "C:\Python27\lib\site-packages\pip\req\req_install.py", line 54, in __ini
t__
    req = pkg_resources.Requirement.parse(req)
  File "C:\Python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", li
ne 2873, in parse
    reqs = list(parse_requirements(s))
  File "C:\Python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", li
ne 2807, in parse_requirements
    raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '(x86)\Google\google_appengine')

至于你现在的错误,因为你的路径中有空格,你应该引用它:

pip install GoogleAppEngineCloudStorageClient -t "C:\Program Files (x86)\Google\google_appengine"

但是,您应该安装到的目录是您的实际项目目录,就像包含您的 app.yaml.

的目录一样