I&#39;m setting up a new machine (Win7) and one of the first things I thought I&#39;d do is install Python, distribute, pip, virtualenv, etc.<br><br>However, I can&#39;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 &quot;distribute_setup.py&quot;, line 20, in &lt;module&gt;<br>    import tempfile<br>  File &quot;C:\Python27\lib\tempfile.py&quot;, line 34, in &lt;module&gt;<br>    from random import Random as _Random<br>
  File &quot;C:\Python27\lib\random.py&quot;, line 881, in &lt;module&gt;<br>    _inst = Random()<br>  File &quot;C:\Python27\lib\random.py&quot;, line 97, in __init__<br>    self.seed(x)<br>  File &quot;C:\Python27\lib\random.py&quot;, line 111, in seed<br>
    a = long(_hexlify(_urandom(16)), 16)<br>WindowsError: [Error -2146893818] Invalid Signature<br><br>&quot;Huh,&quot; I thought.  &quot;That&#39;s weird&quot;.<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 &quot;Wontfix&quot;).<br><br>But this doesn&#39;t seem to me to be the problem, as I&#39;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&#39;s it.  Just &quot;import tempfile&quot; and Python comes to a screeching halt.  In fact, &quot;import random&quot; does this as well, and either one will also cause the traceback from within the interactive interpreter.<br>
<br>What&#39;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>