我正在尝试将Human Api Python 客户端与 GAE 一起使用。
我创建了一个并遵循了 GAE 的 Python 2.7 文档中的第三方库中appengine_config.py
描述的所有说明
我的appengine_config.py
样子:
"""This file is loaded when starting a new application instance."""
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
我的requirements.txt
样子是这样的:
HumanAPI
...并正确安装:
Downloading/unpacking HumanAPI (from -r requirements.txt (line 1))
Downloading humanapi-0.1.10.tar.gz
Running setup.py (path:/private/var/folders/yq/s_1v2vtn2sxbtw_gz00q1r5w0000gp/T/pip_build_jimmykane/HumanAPI/setup.py) egg_info for package HumanAPI
Downloading/unpacking requests>=0.13.2 (from HumanAPI->-r requirements.txt (line 1))
Downloading requests-2.6.0-py2.py3-none-any.whl (469kB): 469kB downloaded
Downloading/unpacking docopt==0.4.0 (from HumanAPI->-r requirements.txt (line 1))
Downloading docopt-0.4.0.tar.gz
Running setup.py (path:/private/var/folders/yq/s_1v2vtn2sxbtw_gz00q1r5w0000gp/T/pip_build_jimmykane/docopt/setup.py) egg_info for package docopt
Installing collected packages: HumanAPI, requests, docopt
Running setup.py install for HumanAPI
Running setup.py install for docopt
Successfully installed HumanAPI requests docopt
Cleaning up...
但是当我尝试导入时:
from humanapi import get_authorize_url, get_auth_session
我得到:
ERROR 2015-03-27 13:18:05,023 wsgi.py:263]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/main.py", line 2, in <module>
from controllers import server, auth, metrics
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/controllers/auth.py", line 9, in <module>
from humanapi import get_authorize_url, get_auth_session
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/humanapi/__init__.py", line 1, in <module>
from .api import *
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/humanapi/api.py", line 1, in <module>
import requests, os.path, logging, sys, time
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/requests/__init__.py", line 58, in <module>
from . import utils
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/requests/utils.py", line 26, in <module>
from .compat import parse_http_list as _parse_list_header
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/requests/compat.py", line 42, in <module>
from .packages.urllib3.packages.ordered_dict import OrderedDict
File "/Users/jimmykane/projects/dimitrioskanellopoulos.com/lib/requests/packages/__init__.py", line 95, in load_module
raise ImportError("No module named '%s'" % (name,))
PIP 版本是 6.0.8
任何人都可以帮助我解决这种依赖问题或指导我做错了什么?
谢谢