How to install numpy on Python 2.7.x

Run your command prompt, and type pip install numpy. Mine look like:

cmd1

Oops!!! says pip is not recognizable command.

First go to C:Python27/Scripts and you can see there lots of .exe files. Mine looks like:

pip_loc

So there is pip.exe within your python folder. To execute this pip.exe from command prompt, You need to add path “C:/Python27/Scripts” to your system variable “path”.

Add “C:/Python27/Scripts” to “path” variable. It looks like:

path

Now your command from command prompt search for pip.exe inside “C:/Python27/Scripts” .

Run your command prompt. Type “pip install numpy” and wait for a while.

numpy

Ok. you are good to go.

Open IDLE(Python GUI). Type import numpy. Now you can use all the functionalities of numpy.

Advertisements

How to install GDAL on windows

Download & Install python 2.7.x from  python.org. You can directly get python 2.7.12 version for 64-bit architecture here.

To install GDAL Library:

Go to the this site from Christoph Gohlke. This site provides you with lots of unofficial windows binaries python extension packages. Packages are alphabetically ordered and since we need GDAL for python, scroll down to GDAL section. Which appears like below:capture

You can see the [GDAL version] [Python version] [architecture] piecewise

You first check your architecture version of your pc whether 64-bit or 32-bit version. Determine your python version and its already 2.7.x version and GDAL version you want.

Download .whl file and place it in a local drive folder as you want.

Run command prompt. Change directory to where you have put the .whl file. Mine is as shown:

adress

My command prompt look like:

cmd1

Then type: pip install GDAL-2.1.3-cp27-cp27m-win_amd64.whl on command prompt as below:

cmd2

In my case GDAL is already installed so it says requirement is already made. In your case try these, you ll get GDAL installed.

Additional:

I was using windows 10 and above mentioned procedure run smoothly without any barrier or stopping in between. Python 2.7, GDAL, IDLE were working as I wanted. ( To test, run IDLE and type “import gdal”, it says nothing. That means your gdal is working.

Later what happen is, my laptop got problem, then I formatted my computer and reboot it with windows 7. Then I repeated the whole above process of installing and running GDAL but doesn’t work.

so you should check whether you have  Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package in your computer. If not, first install this and then only run the gdal.

Note: Stackoverflow Suggestion on this link-> stackoverflow solution.

stackoverflow

I ll be adding other things.