-
Notifications
You must be signed in to change notification settings - Fork 64
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.
A convenient option 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) file, which is about 5GB, 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.
The instruction below has been tested on Ubuntu Linux Version-18.04, and should work similarly in other types of Linux system. (As mentioned above, no admin privilege is required)
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):
- which python
- which jupyter-notebook
- conda install geopandas -y
- conda install netcdf4 -y
Configure GDAL_DATA properly by appending in $HOME/.bashrc
-
echo 'export GDAL_DATA=/home/mtpy/anaconda2/share/gdal' >> /home/mtpy/.bashrc
-
export GDAL_DATA=/home/mtpy/anaconda2/share/gdal
If git command is not installed, do sudo apt install git.
Obtain the mtpy source code:
See the README page for more tips on how to set up mtpy package in your environment.
- Start jupyter-notebook in command-line.
- Use a browser navigate to run the notebooks/MTPy-Installation-Guide-For-Ubuntu-Linux.ipynb.
How to write wiki pages: