With Windows, I am following this Flask tutorial when I came across the following error:
C:\\Users\\Gregory Gundersen\\Documents\\Research\\flask-test>pyt
You appear to have half the changes made for issue 21306 (backporting hmac.compare_digest to 2.7).
Your hmac
module has the lines:
from operator import _compare_digest as compare_digest
at the top, but your sys.version_info
shows you are running Python 2.7.6; quoting our quick chat session:
Me: Next simple check:
import sys print(sys.version_info)
You:
sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)
The hmac
version you have is for Python 2.7.7 and up, however!
You'll want to reinstall your Python; download 2.7.8 and reinstall it to make sure you have the correct binary executable for your standard library files.
This can occur when you have updated python without rebuilding your virtualenv. In this case, just regenerate your virtualenv.