Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing NumPy and SciPy on 64-bit Windows (with Pip)

I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.

I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:

  • There are a lot of errors about LNK2019 and LNK1120,.
  • I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
  • There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
  • And many more errors which are already out of the visible part of my cmd-windows...
  • The fatal error is about LNK1120:

    build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd : fatal error LNK1120: 7 unresolved externals error: Setup script exited with error: Command "C:\Users\me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\BLAS /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_litemodule.obj /OUT:build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.pyd.manifest" failed with exit status 1120

What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.

like image 338
Renzeee Avatar asked Oct 30 '14 15:10

Renzeee


People also ask

Can I install SciPy with pip?

Method 1: Using pip to install Scipy Package Step 1: Install the latest Python3 in MacOS. Step 2: Check if pip3 and python3 are correctly installed. Step 3: Upgrade your pip to avoid errors during installation. Step 4: Enter the following command to install Scipy using pip3.

Can you pip install NumPy?

NumPy can be installed with conda , with pip , with a package manager on macOS and Linux, or from source.


1 Answers

You can install scipy and numpy using their wheels.

First install wheel package if it's already not there...

pip install wheel 

Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.

Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.

Example:

cd C:\Users\[user]\Downloads pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl 
like image 51
Lahiruni Abeywickrama Avatar answered Sep 19 '22 16:09

Lahiruni Abeywickrama