-
Notifications
You must be signed in to change notification settings - Fork 66
MTPy installation guide for Windows
The purpose of this doc is to provide a guidance to install MTPy software environment in Windows PC
MTPy package can run in any Python2.7 as a long as suitable dependency packages are installed. However, we recommend the following:
- use anaconda Python2 distribution, which is freely available.
- use git-bash for Windows PC, as it is very similar to Linux bash, and much easier to use than Windows command.
- install all necessary software into one directory, let's say, C:/mtpywin, so that it would NOT interfere with other software installations on your PC.
No administration privilege is required. A standard user can install these software packages.
It is advised that the software be installed in C-drive for IO performance, even though you can choose to install into an external drive, such as USB. All you need is enough free disk space, at least 5 GB. (If older versions of anaconda installed, consider to remove them to free up disk space)
- create a directory/folder named mtpywin on C-drive
- download anaconda2 (Python 2.7) from continuum website: https://www.anaconda.com/download/
- download git-bash installer from: https://gitforwindows.org/ or https://git-scm.com/downloads
run the Git installer to go through the installation process, use mostly default option, but customized option below:
Click to run the Anaconda2 installer
(This may take a while, more than 10 minutes to complete. Go for a coffee, or wait patiently until it finished successfully.)
use mostly default option, but customized option below:
modify the file C:/mtpywin/Git/etc/bash.bashrc
append the following lines to your bash.bashrc file
PACK_ROOT=/c/mtpywin # change this according to where you install /d/mtpywin
export PATH=$PACK_ROOT/anaconda2:$PACK_ROOT/anaconda2/Scripts:$PACK_ROOT/anaconda2/Library/bin:$PATH
export MATPLOTLIBRC=$PACK_ROOT/anaconda2/etc/
export PYTHONPATH=$PACK_ROOT/mtpy
export GDAL_DATA=$PACK_ROOT/anaconda2/Library/share/gdal
export MTPY_ROOT=$PACK_ROOT/mtpy
eval "cd $MTPY_ROOT"
Once the above steps are tested successful, you are ready to get mtpy and test run it.
open a terminal git-bash
cd /c/mtpywin
git clone https://github.com/MTgeophysics/mtpy.git
cd mtpy
If network connection has issue, you may need to configure https_proxy in the file $HOME/.condarc
bin/install_required_packages.bash
cp doc/config/matplotlibrc /c/mtpywin/anaconda2/etc/
click the executable c:/mtpywin/Git/git-bash.exe (Alternatively click its desktop shortcut if created.)
Enter the following commands
python -V
git --version
This should show what you installed. do not be confused with older versions that might have been installed before.
Optionally, you can now configure you git bash terminal's look-and-feel through the manual option. See the example terminal look and feel below:
Finally run the following script in the mtpy directory:
bin/check_mtpy_env.bash
How to write wiki pages: