I'm setting up a new machine (Win7) and one of the first things I thought I'd do is install Python, distribute, pip, virtualenv, etc.<br><br>However, I can't seem to get that far.<br><br>When trying to install distribute (using distribute_setup.py), I get the following traceback:<br>
<br>Traceback (most recent call last):<br> File "distribute_setup.py", line 20, in <module><br> import tempfile<br> File "C:\Python27\lib\tempfile.py", line 34, in <module><br> from random import Random as _Random<br>
File "C:\Python27\lib\random.py", line 881, in <module><br> _inst = Random()<br> File "C:\Python27\lib\random.py", line 97, in __init__<br> self.seed(x)<br> File "C:\Python27\lib\random.py", line 111, in seed<br>
a = long(_hexlify(_urandom(16)), 16)<br>WindowsError: [Error -2146893818] Invalid Signature<br><br>"Huh," I thought. "That's weird".<br><br>A little googling turned up this bug:<br><br><a href="http://bugs.python.org/issue13524">http://bugs.python.org/issue13524</a><br>
<br>Which has the same traceback, but purports to have something to do with not passing the right environment to the subprocess module (and is marked as "Wontfix").<br><br>But this doesn't seem to me to be the problem, as I'm not using the subprocess module. In fact, here is the minimal reproducible example on my machine:<br>
<br>tfile.py:<br>import tempfile<br><br><br><br>That's it. Just "import tempfile" and Python comes to a screeching halt. In fact, "import random" does this as well, and either one will also cause the traceback from within the interactive interpreter.<br>
<br>What's going on here? Is this a Win7 thing? I have 2.7.3 working on XP and Vista without a problem.<br><br>Any pointers?<br><br>Kevin Horn<br>