First, install Anaconda for Python 3.5, following the instructions there.
If you wish, you can also install
git for your platform, but it's not a requirement.
If you are using
git, clone this repo: https://github.com/EvanBianco/Practical_Programming_for_Geoscientists
If not, download this ZIP file: https://github.com/EvanBianco/Practical_Programming_for_Geoscientists/archive/master.zip
Put the folder somewhere you will find it again.
This file is in the top level folder, called
Do the following in a terminal:
conda config –-add channels conda-forge conda create –n geocomputing python=3.5 anaconda
Start the environment:
source activate geocomputing
Now install packages:
conda install numpy # Ensures latest. conda install obspy conda install geopandas conda install ipyparallel conda install tqdm conda install folium pip install lasio pip install welly pip install bruges
All of this should go without trouble.
Now you will need to start running this notebook.
# If you didn't do this already: git clone https://github.com/EvanBianco/Practical_Programming_for_Geoscientists
cd geocomputing jupyter notebook Build_and_test_environment.ipynb
or if you're already running it, restart its kernel... and we can go on to check the environment.
In [ ]:!python -V # Should be 3.5
In [ ]:import numpy as np import matplotlib.pyplot as plt from scipy.signal import ricker
In [ ]:import pandas as pd
In [ ]:import requests
In [ ]:import numba
In [ ]:import ipyparallel as ipp
In [ ]:import obspy
In [ ]:import geopandas as gpd # Not a catastrophe if missing.
In [ ]:import folium # Not a catastrophe if missing.
In [ ]:import lasio
In [ ]:import welly
In [ ]:import bruges as b
In :import os import requests
In [ ]:files = [ '2D_Land_vibro_data_2ms.tgz', '3D_gathers_pstm_nmo_X1001.sgy', 'Penobscot_0-1000ms.sgy.gz', 'Penobscot_NumPy.npy.gz', ] url = "https://s3.amazonaws.com/agilegeo/"
In [ ]:localpath = '' # For CWD. for file in files: print(file) r = requests.get(url+file, stream=True) chunk_size = 1024 * 1024 # 1MB with open(os.path.join(localpath, file), 'wb') as fd: for chunk in r.iter_content(chunk_size): if chunk: fd.write(chunk)
In [ ]: