<div dir="ltr">Ok, I followed instructions on this page:<div><br></div><div><a href="https://software.intel.com/en-us/articles/building-numpyscipy-with-intel-mkl-and-intel-fortran-on-windows">https://software.intel.com/en-us/articles/building-numpyscipy-with-intel-mkl-and-intel-fortran-on-windows</a><br></div><div><br></div><div>Installed parallel_studio_xe_2016_update4 with mkl, ifort, and icc.</div><div><br></div><div>1. I compiled numpy (python setup.py install) from source with this site.cfg file:</div><div><br></div><div><div>[mkl]</div><div>include_dirs = C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2016.4.062\compilers_and_libraries_2016\windows\mkl\include</div><div>library_dirs = C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2016.4.062\compilers_and_libraries_2016\windows\mkl\lib\intel64;C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2016.4.062\compilers_and_libraries_2016\windows\compiler\lib\intel64</div><div>mkl_libs = mkl_core_dll, mkl_intel_lp64_dll, mkl_intel_thread_dll</div><div>lapack_libs = mkl_lapack95_lp64</div></div><div><br></div><div><br></div><div>2. I replaced site.cfg file in ..\Lib\site-packages\numpy\distutils with the one above, since this is used by scipy in step 3.</div><div><br></div><div>3. I compiled scipy (python setup.py install) from source.</div><div><br></div><div>Compilation went without errors, both packages import without errors in python.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 8:26 PM, David Hagen <span dir="ltr"><<a href="mailto:david@drhagen.com" target="_blank">david@drhagen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So those instructions get me farther than I have gotten before.<div><br></div><div>Is this actually necessary?:</div><div><br></div><div><span style="color:rgb(102,102,102);font-family:arial,tahoma,helvetica,sans-serif;font-size:14px">Note: You will need to rebuild Python from source files. This is due to the downloaded Python binary on Windows might be incompatible with the Visual Studio version you used. Otherwise you will encounter runtime crash when run numpy or script tests.</span><br></div><div><br></div><div>This is what I have done so far:</div><div><br></div><div>1) Download Scipy zip file from Github mater branch</div><div>2) Unzip file</div><div>3) Add a site.cfg file with these contents:</div><div><font face="monospace, monospace">[mkl]<br></font></div><div><div><font face="monospace, monospace">library_dirs = C:\Program Files (x86)\IntelSWTools\compilers_<wbr>and_libraries_2017.2.187\<wbr>windows\mkl\lib\intel64_win;C:<wbr>\Program Files (x86)\IntelSWTools\compilers_<wbr>and_libraries_2017.2.187\<wbr>windows\compiler\lib\intel64_<wbr>win</font></div><div><font face="monospace, monospace">include_dirs = C:\Program Files (x86)\IntelSWTools\compilers_<wbr>and_libraries_2017.2.187\<wbr>windows\mkl\include</font></div><div><font face="monospace, monospace">mkl_libs = mkl_lapack95_lp64,mkl_blas95_<wbr>lp64,mkl_intel_lp64,mkl_intel_<wbr>thread,mkl_core,libiomp5md</font></div><div><font face="monospace, monospace">lapack_libs = mkl_lapack95_lp64,mkl_blas95_<wbr>lp64,mkl_intel_lp64,mkl_intel_<wbr>thread,mkl_core,libiomp5md</font></div></div><div><br></div><div>4) cd into that directory</div><div>5) run: <font face="monospace, monospace">python setup.py config --compiler=intelemw --fcompiler=intelvem build_clib --compiler=intelemw --fcompiler=intelvem build_ext --compiler=intelemw --fcompiler=intelvem install</font></div><div><br></div><div>It gets really far into the build but this is the error that results:</div><div><br></div><div><div><font face="monospace, monospace">building extension "scipy.spatial.qhull" sources</font></div><div><font face="monospace, monospace">creating build\src.win-amd64-3.6\scipy\<wbr>spatial</font></div><div><font face="monospace, monospace">Could not locate executable icc</font></div><div><font face="monospace, monospace">Could not locate executable ecc</font></div><div><font face="monospace, monospace">Traceback (most recent call last):</font></div><div><font face="monospace, monospace"> File "setup.py", line 417, in <module></font></div><div><font face="monospace, monospace"> setup_package()</font></div><div><font face="monospace, monospace"> File "setup.py", line 413, in setup_package</font></div><div><font face="monospace, monospace"> setup(**metadata)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\core.py</font></div><div><font face="monospace, monospace">", line 166, in setup</font></div><div><font face="monospace, monospace"> return old_setup(**new_attr)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\distutils\core.py", line 148, in setu</font></div><div><font face="monospace, monospace">p</font></div><div><font face="monospace, monospace"> dist.run_commands()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\distutils\dist.py", line 955, in run_</font></div><div><font face="monospace, monospace">commands</font></div><div><font face="monospace, monospace"> self.run_command(cmd)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\distutils\dist.py", line 974, in run_</font></div><div><font face="monospace, monospace">command</font></div><div><font face="monospace, monospace"> cmd_obj.run()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\build_clib.py", line 74, in run</font></div><div><font face="monospace, monospace"> self.run_command('build_src')</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\distutils\cmd.py", line 313, in run_c</font></div><div><font face="monospace, monospace">ommand</font></div><div><font face="monospace, monospace"> self.distribution.run_command(<wbr>command)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\distutils\dist.py", line 974, in run_</font></div><div><font face="monospace, monospace">command</font></div><div><font face="monospace, monospace"> cmd_obj.run()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\build_src.py", line 148, in run</font></div><div><font face="monospace, monospace"> self.build_sources()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\build_src.py", line 165, in build_sources</font></div><div><font face="monospace, monospace"> self.build_extension_sources(<wbr>ext)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\build_src.py", line 324, in build_extension_sources</font></div><div><font face="monospace, monospace"> sources = self.generate_sources(sources, ext)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\build_src.py", line 377, in generate_sources</font></div><div><font face="monospace, monospace"> source = func(extension, build_dir)</font></div><div><font face="monospace, monospace"> File "scipy\spatial\setup.py", line 35, in get_qhull_misc_config</font></div><div><font face="monospace, monospace"> if config_cmd.check_func('open_<wbr>memstream', decl=True, call=True):</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\config.py", line 312, in check_func</font></div><div><font face="monospace, monospace"> self._check_compiler()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\command</font></div><div><font face="monospace, monospace">\config.py", line 51, in _check_compiler</font></div><div><font face="monospace, monospace"> self.compiler.initialize()</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\intelcc</font></div><div><font face="monospace, monospace">ompiler.py", line 86, in initialize</font></div><div><font face="monospace, monospace"> MSVCCompiler.initialize(self, plat_name)</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\msvc9co</font></div><div><font face="monospace, monospace">mpiler.py", line 53, in initialize</font></div><div><font face="monospace, monospace"> os.environ['lib'] = _merge(environ_lib, os.environ['lib'])</font></div><div><font face="monospace, monospace"> File "C:\Anaconda3\envs\scipy_<wbr>master\lib\site-packages\<wbr>numpy\distutils\msvc9co</font></div><div><font face="monospace, monospace">mpiler.py", line 32, in _merge</font></div><div><font face="monospace, monospace"> if new in old:</font></div><div><font face="monospace, monospace">TypeError: argument of type 'NoneType' is not iterable</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">I notice that this is calling into Numpy. Do I have modify Numpy in order to compile Scipy? I skipped the Numpy specific steps in the instructions because I don't need the development version of Numpy.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Tue, May 2, 2017 at 11:15 PM, Denis Akhiyarov <span dir="ltr"><<a href="mailto:denis.akhiyarov@gmail.com" target="_blank">denis.akhiyarov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Did you follow these instructions?</p>
<p dir="ltr"><a href="https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl" target="_blank">https://software.intel.com/en-<wbr>us/articles/numpyscipy-with-in<wbr>tel-mkl</a></p><div class="m_-4576724647878591260HOEnZb"><div class="m_-4576724647878591260h5">
<br><div class="gmail_quote"><div dir="ltr">On Tue, May 2, 2017, 10:00 PM David Hagen <<a href="mailto:david@drhagen.com" target="_blank">david@drhagen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is there a recipe for this combination? I installed MKL from that link and the latest Visual Studio. Scipy did not find MKL on its own. I'm sure there's some environment variables that need to be set, but I don't know what they are.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 4:00 AM, William Heymann <span dir="ltr"><<a href="mailto:immudzen@gmail.com" target="_blank">immudzen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Intel has made MKL, TBB, and a few other things completely free to use, even in a commercial project. Visual Studio is also free unless you are a very large company.<div><br></div><div><a href="https://software.intel.com/en-us/articles/free-mkl" target="_blank">https://software.intel.com/en-<wbr>us/articles/free-mkl</a><br></div><div><br></div><div>I have been using that for other projects without any problems and compiling with Visual Studio has been very easy.</div></div><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891HOEnZb"><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 1:40 AM, David Hagen <span dir="ltr"><<a href="mailto:david@drhagen.com" target="_blank">david@drhagen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'll try to stick with MinGW-w64 for now, but I don't even get to the compilation phase. If I install lapack and blas from conda-forge, it still says that lapack/blas are not found, but you indicated that I need to set some paths. Are there instructions for this? I have no idea what environment variables to set in order to tell Scipy to use these packages.</div><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891m_4799206474272590635HOEnZb"><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891m_4799206474272590635h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 1, 2017 at 3:44 AM, Denis Akhiyarov <span dir="ltr"><<a href="mailto:denis.akhiyarov@gmail.com" target="_blank">denis.akhiyarov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I still suggest Intel+MSVC compilers, since you can use trial version or request license for open-source projects from Intel. This is what Anaconda team is using. Also this is what Christoph Gohlke wheels are based on:</p>
<p dir="ltr"><a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy" target="_blank">http://www.lfd.uci.edu/~gohlke<wbr>/pythonlibs/#scipy</a></p>
<p dir="ltr">If you end up with m2w64, here is lapack for conda, you may still have to modify paths:</p>
<p dir="ltr"><a href="https://anaconda.org/conda-forge/lapack" target="_blank">https://anaconda.org/conda-for<wbr>ge/lapack</a></p>
<p dir="ltr">And blas:</p>
<p dir="ltr"><a href="https://anaconda.org/search?q=Blas" target="_blank">https://anaconda.org/search?q=<wbr>Blas</a></p><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891m_4799206474272590635m_3436545195645308132HOEnZb"><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891m_4799206474272590635m_3436545195645308132h5">
<br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 30, 2017, 5:22 PM Matthieu Brucher <<a href="mailto:matthieu.brucher@gmail.com" target="_blank">matthieu.brucher@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why do you want to pay Intel? You can install the MKL and develop with it, no sweat.<br></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-30 22:41 GMT+01:00 David Hagen <span dir="ltr"><<a href="mailto:david@drhagen.com" target="_blank">david@drhagen.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>> Welcome to the world of pain with building scientific packages from source on Windows!<br><br></span>I am beginning to feel it.<span><br><br>> You need Fortran and C/C++ compilers on Windows to build scipy from source<div><br></div></span><div>I have MinGW-w64 installed, which seems to be the recommended method.<span><br><div><br></div>> I’m pretty sure that anaconda does not come with the development files for MKL, only the runtime files.<div><br></div></span></div>I understand now. It looks like MKL is not the way to go unless I want to pay Intel.<div><br></div><div><span>> If you don't need mkl and lapack/blas is good enough, then m2w64-toolchain from conda should have all necessary dependencies for building scipy.<div><br></div></span><div>My only goal is to install and use Scipy master somewhere where it won't break my stable installation. I thought Anaconda would be a good place to start because once I activate an Anaconda environment, I should be able to treat like a normal Python installation and follow the normal install-from-source instructions. I went ahead and installed that m2w64-toolchain package, but it still doesn't find any BLAS/LAPACK. Maybe I should change my question to: how do I install Scipy on Windows from source? Though when I search for this specifically on the web, the answer seems to be "Don't.". It seems that MinGW-w64 and ATLAS are recommended by Scipy. Do you know of a conda/pip package that provides ATLAS for building Scipy or another more suitable BLAS/LAPACK?</div></div></div>
<br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
<br></blockquote></div><br><br clear="all"><br></div><div class="gmail_extra">-- <br><div class="m_-4576724647878591260m_-9056276106922896432m_1653131594521208891m_4799206474272590635m_3436545195645308132m_1783714150020590858m_-7251015949388091773gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Information System Engineer, Ph.D.<br>Blog: <a href="http://blog.audio-tk.com/" target="_blank">http://blog.audio-tk.com/</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/mat<wbr>thieubrucher</a></div></div></div>
</div>
______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>
______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div></div>
<br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>