2015-04-01 101 views
0

非常特定的東西。我在亞馬遜上運行一個Bitnami Django堆棧雲虛擬機。在兩個不同的「常規」計算機上,我可以通過運行sudo pip install requests來安裝requests,但似乎Bitname使用它自己的特定結構,並且在以這種方式安裝requests時出現問題。它也可能與問題#2028有關,但它很久以前就已修復。Bitnami Django堆棧和模塊「請求」:無法導入名稱'certs'

我有以下追蹤:

Environment: 


Request Method: GET 
Request URL: http://54.94.226.137/ 

Django Version: 1.7.7 
Python Version: 2.7.6 
Installed Applications: 
('django.contrib.admin', 
'django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.messages', 
'django.contrib.staticfiles', 
'django.contrib.sites', 
'vz_base', 
'vz_api', 
'vz_admin', 
'vz_user') 
Installed Middleware: 
('django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.clickjacking.XFrameOptionsMiddleware') 


Traceback: 
File "/opt/bitnami/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 
    98.     resolver_match = resolver.resolve(request.path_info) 
File "/opt/bitnami/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve 
    343.    for pattern in self.url_patterns: 
File "/opt/bitnami/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns 
    372.   patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) 
File "/opt/bitnami/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module 
    366.    self._urlconf_module = import_module(self.urlconf_name) 
File "/opt/bitnami/python/lib/python2.7/importlib/__init__.py" in import_module 
    37.  __import__(name) 
File "/opt/bitnami/apps/django/django_projects/ProjetoVigZul/ProjetoVigZul/urls.py" in <module> 
    5. from vz_api import urls as api_urls 
File "/opt/bitnami/apps/django/django_projects/ProjetoVigZul/vz_api/urls.py" in <module> 
    8. from vz_api import views 
File "/opt/bitnami/apps/django/django_projects/ProjetoVigZul/vz_api/views.py" in <module> 
    14. from vz_api.dguard import DGuardManager, DGuardIntegrationException 
File "/opt/bitnami/apps/django/django_projects/ProjetoVigZul/vz_api/dguard.py" in <module> 
    5. import requests, json 
File "/opt/bitnami/python/lib/python2.7/site-packages/requests/__init__.py" in <module> 
    58. from . import utils 
File "/opt/bitnami/python/lib/python2.7/site-packages/requests/utils.py" in <module> 
    25. from . import certs 

Exception Type: ImportError at/
Exception Value: cannot import name certs 

網站是活在http://54.94.226.137/,如果有人有興趣。

+0

你顯然缺少'/opt/bitnami/python/lib/python2.7/site-packages/requests/certs.py'模塊。 – 2015-04-01 12:06:49

+0

似乎是這樣,但模塊在那裏,我只是檢查它的內容......似乎由於某種原因,「來自」。使用'dot'符號導入certs'不起作用。一些參考問題? – 2015-04-01 13:54:20

+0

但是來自。 import utils'行(追溯中的一步)工作得很好。 – 2015-04-01 13:55:05

回答

2

須藤PIP安裝--upgrade請求

解決了我

相關問題