You are on page 1of 2

Climate Change

Tutorial class #0 for B2 Student, SA Department


March 2018
I. HOW TO INSTALL PYTHON ON WINDOWS

1) Install Python for Windows


https://www.python.org/downloads/release/python-2713/
2) Download get-pip.py to C:\Python27\
 Get-pip.py can be downloaded at https://bootstrap.pypa.io/get-pip.py or
https://github.com/pypa/get-pip
 Open Windows command windows (Start  type “cmd” at the box “Search
programs and files”)
 At the command prompt, go to C:\Python27\ by typing: “cd C:\Python27\
 Type: python get-pip.py

3) Please note the Unofficial Windows Binaries for Python Extension Packages:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
You can download the needed binaries and to install it, pls read carefully the following
instructions:

4) To install Numpy
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
 download file numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl to the folder:
C:\Python27\Scripts
 At the command prompt, navigate to the above directory and type:
pip2.7.exe install “numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl”
5) To install MatPLOTLIB/ NETCDF4/ PYPROJ/ BASEMAP
 Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/ to download
o matplotlib-1.5.3-cp27-cp27m-win_amd64.whl
o netCDF4-1.2.8-cp27-cp27m-win_amd64.whl
o pyproj-1.9.5.1-cp27-cp27m-sin_amd64.whl
o basemap-1.1.0-cp27-cp27m-win_amd64.whl
 Follow similar installation steps as for Numpy
II. HOW TO INSTALL PYTHON ON MacOS

III. HOW TO INSTALL PYTHON ON UBUNTU


1) Install python2.7
2) Download: get-pip.py
3) sudo python get-pip.py
4) sudo pip install numpy
5) sudo pip install matplotlib
6) sudo pip install netcdf4
7) Install Basemap
1. sudo pip install geos
2. sudo pip install proj
3. # download basemap source code from
https://sourceforge.net/projects/matplotlib/files/matplotlib-
toolkits/basemap-1.0.7
4. # untar the source code, cd basemap-1.x.x/geos-3.3.3
5. export GEOS_DIR=/usr/local (or where you want)
6. ./configure --prefix=$GEOS_DIR
7. sudo make; sudo make install
8. cd .. (i.e. go to the basemap-1.x.x folder)
9. sudo python setup.py install

You might also like