尝试在third parties
中安装google appengine.
库我想要做的就是使用pip
进行安装,然后将文件夹从site-package
复制到我的项目根lib
夹。我做了并将Crypto粘贴到lib文件夹中。然后抛出以下错误。我想知道为什么在virtualenv工作不能在自定义环境中工作..?
当我运行dev_appserver.py Project
时出现以下错误。
如何解决此追溯错误..?
Traceback:
File "/home/ri/studio/project/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/core/handlers/base.py" in get_response
101. resolver_match = resolver.resolve(request.path_info)
File "/home/ri/studio/project/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/core/urlresolvers.py" in resolve
338. for pattern in self.url_patterns:
File "/home/ri/studio/project/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/core/urlresolvers.py" in url_patterns
366. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/ri/studio/project/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/core/urlresolvers.py" in urlconf_module
361. self._urlconf_module = import_module(self.urlconf_name)
File "/home/ri/studio/project/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/utils/importlib.py" in import_module
35. __import__(name)
File "/home/ri/studio/engineapp/Audiotube/audiotube/urls.py" in <module>
8. from dsp import views
File "/home/ri/studio/engineapp/Audiotube/dsp/views.py" in <module>
72. import paramiko
File "/home/ri/studio/engineapp/Audiotube/lib/paramiko/__init__.py" in <module>
62. from transport import SecurityOptions, Transport
File "/home/ri/studio/engineapp/Audiotube/lib/paramiko/transport.py" in <module>
33. from paramiko import util
File "/home/ri/studio/engineapp/Audiotube/lib/paramiko/util.py" in <module>
33. from paramiko.common import *
File "/home/ri/studio/engineapp/Audiotube/lib/paramiko/common.py" in <module>
98. from Crypto import Random
File "/home/ri/studio/engineapp/Audiotube/lib/Crypto/Random/__init__.py" in <module>
28. from Crypto.Random import OSRNG
Exception Type: ImportError at /
Exception Value: cannot import name OSRNG
答案 0 :(得分:1)
看起来pycrpto
导致了这个问题。
默认 Google Appengine 支持 pycrypto
Link here: https://cloud.google.com/appengine/docs/python/tools/libraries27