<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/2049" rel="nofollow">http://projects.scipy.org/numpy/ticket/2049</a> on 2012-02-12 by trac user jusic, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a>.</em></p>
<p dir="auto">Hi,</p>
<p dir="auto">I just managed to compile a 64-bit version of latest numpy git-master on Windows 7 Prof. 64-bit and VS2008 Express Edition + PSDK 6.1. I would like to provide some input for "Microsoft Toolchain Support" wiki page (<a href="http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport" rel="nofollow">http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport</a>), since it's not too specific on how this is done.</p>
<p dir="auto">I installed the following packages:</p>
<ul dir="auto">
<li>"Windows SDK for Windows Server 2008 and .NET Framework 3.5":[[BR]]</li>
<li>download link: <a href="http://www.microsoft.com/download/en/details.aspx?id=24826" rel="nofollow">http://www.microsoft.com/download/en/details.aspx?id=24826</a> [[BR]]</li>
<li>file: 6.0.6001.18000.367-KRMSDK_EN.iso</li>
<li>"Microsoft Visual Studio 2008 Express Edition"[[BR]]</li>
<li>download link: <a href="http://www.microsoft.com/download/en/details.aspx?id=3092" rel="nofollow">http://www.microsoft.com/download/en/details.aspx?id=3092</a> [[BR]]</li>
<li>file: VS2008ExpressENUX1397868.iso</li>
<li>Python 2.7.2 (amd64) + distutils + all that is needed. C:\Python27\ is in %PATH%.</li>
</ul>
<p dir="auto">To make amd64 compilers work, the batch file "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" needs to be fixed on lines 19 and 20 to:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if not exist &quot;%~dp0bin\vcvars64.bat&quot; goto missing
call &quot;%~dp0bin\vcvars64.bat&quot;"><pre class="notranslate"><code class="notranslate">if not exist "%~dp0bin\vcvars64.bat" goto missing
call "%~dp0bin\vcvars64.bat"
</code></pre></div>
<p dir="auto">Then, to build numpy install package, open command prompt and cd to numpy-git directory, and run:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; &quot;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat&quot; amd64
&gt; python setup.py config
&gt; python setup.py build
&gt; python setup.py bdist_wininst"><pre class="notranslate"><code class="notranslate">&gt; "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
&gt; python setup.py config
&gt; python setup.py build
&gt; python setup.py bdist_wininst
</code></pre></div>
<p dir="auto">The package seems to work even if I didn't have a Fortran compiler. I had MinGW installed but not in %PATH%.</p>
<p dir="auto">Thanks.</p>
<p dir="auto">It seems that saving large numpy arrays to disk using numpy.save fails silently for very large matrices, example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: a = np.random.randn(500000000)

In [6]: 

In [6]: a
Out[6]: 
array([-1.00736353, -2.06696394,  1.46569636, ...,  0.89738222,
       -0.06982733,  0.06954417])

In [7]: np.save('a', a)

In [8]: b = np.load('a.npy')

In [9]: b
Out[9]: 
array([-1.00736353, -2.06696394,  1.46569636, ...,  0.        ,
        0.        ,  0.        ])"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">500000000</span>)

<span class="pl-v">In</span> [<span class="pl-c1">6</span>]: 

<span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">a</span>
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: 
<span class="pl-en">array</span>([<span class="pl-c1">-</span><span class="pl-c1">1.00736353</span>, <span class="pl-c1">-</span><span class="pl-c1">2.06696394</span>,  <span class="pl-c1">1.46569636</span>, ...,  <span class="pl-c1">0.89738222</span>,
       <span class="pl-c1">-</span><span class="pl-c1">0.06982733</span>,  <span class="pl-c1">0.06954417</span>])

<span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">np</span>.<span class="pl-en">save</span>(<span class="pl-s">'a'</span>, <span class="pl-s1">a</span>)

<span class="pl-v">In</span> [<span class="pl-c1">8</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">load</span>(<span class="pl-s">'a.npy'</span>)

<span class="pl-v">In</span> [<span class="pl-c1">9</span>]: <span class="pl-s1">b</span>
<span class="pl-v">Out</span>[<span class="pl-c1">9</span>]: 
<span class="pl-en">array</span>([<span class="pl-c1">-</span><span class="pl-c1">1.00736353</span>, <span class="pl-c1">-</span><span class="pl-c1">2.06696394</span>,  <span class="pl-c1">1.46569636</span>, ...,  <span class="pl-c1">0.</span>        ,
        <span class="pl-c1">0.</span>        ,  <span class="pl-c1">0.</span>        ])</pre></div>
<p dir="auto">Note zeros in the end of the matrix that do not exist in a</p>
<p dir="auto">I'm running numpy version 1.6.2:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [11]: np.version.version
Out[11]: '1.6.2'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">np</span>.<span class="pl-s1">version</span>.<span class="pl-s1">version</span>
<span class="pl-v">Out</span>[<span class="pl-c1">11</span>]: <span class="pl-s">'1.6.2'</span></pre></div>
<p dir="auto">on python 2.7.3 on Mac os X 10.8.2 if that helps</p>