2
的Django告訴我的「導入錯誤:沒有模塊名爲pytz」,但是當我去使用PIP安裝它,我得到這樣的結果:pytz在Mac上安裝
Requirement already satisfied (use --upgrade to upgrade): pytz in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
是否有可能是在尋找錯誤的位置,或者我需要嘗試在別的地方安裝它?
以下是完整的堆棧跟蹤:
Internal Server Error: /basicloginwebservice/
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 103, in get_response
resolver_match = resolver.resolve(request.path_info)
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 321, in resolve
sub_match = pattern.resolve(new_path)
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 223, in resolve
return ResolverMatch(self.callback, args, kwargs, self.name)
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 230, in callback
self._callback = get_callable(self._callback_str)
File "/Library/Python/2.7/site-packages/django/utils/functional.py", line 29, in wrapper
result = func(*args)
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 97, in get_callable
mod = import_module(mod_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/<redacted>/django/<redacted>/<redacted>/views.py", line 3, in <module>
import pytz
ImportError: No module named pytz
由於