2
我今天做了很多改變,包括環境變量,Pyscripter和從2.7.5更新Python到2.7.7。當我嘗試在我的Django站點上嘗試runserver時,其中一個更改現在會導致出現錯誤。Django依賴:hmac?
(myEnv)PS C:\Users\Josh\.virtualenvs\myEnv\tumblr> python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\Lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
utility.execute()
File "C:\Python27\Lib\site-packages\django\core\management\__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\Lib\site-packages\django\core\management\__init__.py", line 261, in fetch_command
commands = get_commands()
File "C:\Python27\Lib\site-packages\django\core\management\__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "C:\Python27\Lib\site-packages\django\conf\__init__.py", line 54, in __getattr__
self._setup(name)
File "C:\Python27\Lib\site-packages\django\conf\__init__.py", line 50, in _setup
self._configure_logging()
File "C:\Python27\Lib\site-packages\django\conf\__init__.py", line 72, in _configure_logging
from django.utils.log import DEFAULT_LOGGING
File "C:\Python27\Lib\site-packages\django\utils\log.py", line 7, in <module>
from django.views.debug import ExceptionReporter, get_exception_reporter_filter
File "C:\Python27\Lib\site-packages\django\views\debug.py", line 10, in <module>
from django.http import (HttpResponse, HttpResponseServerError,
File "C:\Python27\Lib\site-packages\django\http\__init__.py", line 2, in <module>
from django.http.request import (HttpRequest, QueryDict, UnreadablePostError,
File "C:\Python27\Lib\site-packages\django\http\request.py", line 11, in <module>
from django.core import signing
File "C:\Python27\Lib\site-packages\django\core\signing.py", line 45, in <module>
from django.utils.crypto import constant_time_compare, salted_hmac
File "C:\Python27\Lib\site-packages\django\utils\crypto.py", line 6, in <module>
import hmac
File "C:\Python27\Lib\hmac.py", line 8, in <module>
from operator import _compare_digest as compare_digest
ImportError: cannot import name _compare_digest
我試過更新Django,但我有最新版本。接下來是卸載Django並重新安裝它,如果這不會搞亂我的項目。有任何想法嗎?非常感謝!