-
Notifications
You must be signed in to change notification settings - Fork 66
MTPy installation guide for Linux system
MTPy package can be run in any Python2.7 as long as the required dependency packages are installed. However, we recommend use Anaconda Python distribution because of its many features including strong scientific flavor and free availability. No admin privilege is required to install the Anaconda Python software packages.
This wiki page will be focused on Anaconda Python installation for MTPy in Linux. (If you use Windows PC, please see the installation guide for Windows.
(As mentioned already, no admin privilege is required)
The instruction is tested on Ubuntu Linux Version-18.04, and should be similar in other flavours of Linux systems.
1) obtain the installation package by download
OR
Saving to: 'Anaconda2-5.2.0-Linux-x86_64.sh’
- chmod 755 Anaconda2-5.2.0-Linux-x86_64.sh¶
- ./Anaconda2-5.2.0-Linux-x86_64.sh
Welcome to Anaconda2 5.2.0
In order to continue the installation process, please review the license agreement. Please, press ENTER to continue
Accept the license and let it install into default directory location (/home/mtpy/anaconda2). This process will take a couple of minutes to complete. In the end when prompted, enter yes to make the new ananconda python PATH available by appending automatically a line of configuration into your $HOME/.bashrc, with output shown below:
[no] > yes
Appending source /home/mtpy/anaconda2/bin/activate to /home/mtpy/.bashrc A backup will be made to: /home/mtpy/.bashrc-anaconda2.bak
For this change to become active, you have to open a new terminal.
Thank you for installing Anaconda2!
=========================================================================== Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
no
After the successful installation of Anaconda Python, open a new terminal and test to make sure your default python interpreter is /home/mtpy/anaconda2/bin/python, not your OS-provided python (/user/bin/python):
or gdal, pandas, geopandas and netcdf4 data handling:
conda install geopandas -y
conda install netcdf4 -y
Configure GDAL_DATA properly by appending in $HOME/.bashrc
export GDAL_DATA=/home/mtpy/anaconda2/share/gdal
(one way to do this is: echo 'export GDAL_DATA=/home/mtpy/anaconda2/share/gdal' >> /home/mtpy/.bashrc)
If git command is not installed, do
- sudo apt install git
Obtain the mtpy source code:
- git clone https://github.com/MTgeophysics/mtpy
See the README page for more tips.
An alternative way to get a Ubuntu Linux system is to use Oracle VirualBox, freely downloadable from https://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html.
After install VirtualBox,the user can create a virtual guest OS such as Ubuntu-18.04.
Note: In the workshop, we plan to provide an Oracle Virtual Appliance (Ubuntu1804-mtpy.ova),which is a file of 4GB in size, and can be directly imported into your VirtualBox. It contains all materials and installation required for Workshop, so that you will be able to run the Workshop material without installing anything else.
How to write wiki pages: