Installing Scipy and Numpy Stack in windows virtualenvironment

I am writing this post because I wanted to share a solution to install scipy and numpy on a windows computer. Let me start by saying - It was very confusion at the begining why I couldn’t just hit pip install numpy scipy, and I had to try a whole lot of things, and read a whole lot of stackoverflow answers to finally find something that works and doesn’t require you to install a fortran compiler. I am using 64 bit windows 7 now, so this has only been tested with my current configuration. I suspect this is how most of the consumers computers come these days. This solution should work with windows 10. Keep in mind this is ‘a’ solution, and I am sure there is multiple ways of installing the numpy and scipy stack in a virtualenvironment in windows.

Here is the spill:
I had zero succes with a 64 bit installation of python. Uninstall the 64 bit version of python. Install a 32 bit installation. I picked Python 3.4, but I encourage you to try this with 3.5 as well.

Open a windows command prompt and run pip install virtualenv. This will install virtualenvironment if not already installed.

Next, we need to install numpy and scipy stack. Download scipy and numpy installers from source forge pages here : scipy download page and numpy download page. Notice that you are downloading a 32 bit installer. Thats intentional.

Use 7zip and extract the numpy and scipy .exe files you just downloaded. You will see three exe files with nosse, sse2 and ss3 in their names. If you have a newer computer extract ss3 version.

Next, create a virtual environment by typing virtualenv venv.

Then activate the virtualenvironment by typing venv\Scripts\activate

Next, we will cd into the folder you extracted the exe file, and do
easy_install numpy-1.9.1-sse3.exe for numpy and easy_install scipy-0.16.1-sse3.exe

Thats it!

Test out your system by doing the following:

python

import scipy.interpolate 

If you do not get any errors, you you successfully installed numpy and scipy in your virtual environment.

I hope this was helpful.
Krishna

 
2
Kudos
 
2
Kudos

Now read this

Making an impact in the world and how business fits in that framework

Let me start with a story… A long long long time ago, when people just started farming, there used to be a village. Lets call this village Surkhet (my hometown in Nepal). Surkhet was a farming town. Everybody farmed. The day usually... Continue →