<p>You will probably want to use Python to wrap a C/C++ routine, instead of using the Python implementation of RdRand().  A research paper here (<a href="http://iopscience.iop.org/article/10.3847/1538-4357/aa7ede/meta;jsessionid=A9DA9DDB925E6522D058F3CEEC7D0B21.ip-10-40-2-120" rel="nofollow noreferrer">http://iopscience.iop.org/article/10.3847/1538-4357/aa7ede/meta;jsessionid=A9DA9DDB925E6522D058F3CEEC7D0B21.ip-10-40-2-120</a>), or non-paywalled version here (<a href="https://arxiv.org/abs/1707.02212" rel="nofollow noreferrer">https://arxiv.org/abs/1707.02212</a>) recently showed how poor the performance of RdRand() in Python is.  Even so, as the paper mentions, the RdRand and RdSeed instructions are not quite "truly" random...</p>

<p>Hope that helps.</p>
Using Intel RDRAND in Python 2.7
<p>I want to make use of Intel's RDRAND feature on Windows and generate true random numbers (since Python's random module isn't so random). Is there any API in Python which can access this feature?</p>

<p>I've tried installing the rdrand module mentioned in the comment below, but I keep getting an error. Log: <a href="http://pastebin.com/A2Vqsqec" rel="nofollow noreferrer">http://pastebin.com/A2Vqsqec</a></p>

<p>The error seems to be thrown by these lines in rdrand.c:</p>

<pre><code>#ifdef __GNUC__
#define USING_GCC 1
#elif __clang__
#define USING_CLANG 1
#else
#error Only support for gcc or clang currently
#error if you port to another compiler, please
#error send back the patch to https://github.com/stillson/rdrand
#endif
</code></pre>

<p>Why is this happening?</p>

<p>UPDATE: I've checked and made sure that __GNUC__ is defined</p>