Skip to content

Installing pygslib with conda

Adrian Martinez Vargas edited this page Oct 26, 2018 · 16 revisions

Preliminaries

Pygslib is distributed as a conda package and is available for Windows, Linux and macOS. It supports 64 bits Python 3.6 and 2.7. Python 3.7 is not supported yet because vtk, a key dependency of pygslib, is not available in conda-forge or in anaconda cloud for this python version.

Do I have conda?

To see if you have a conda distribution open a terminal (linux/macOS) or a command prompt (windows) and type any of the commands

where conda
which conda
conda info
conda list
conda list --envs

To check what version of python you have just type python, for example:

c:\>python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Installing a new conda distributions

Go to https://conda.io/miniconda.html and download and install miniconda for python 3 or 2, depending on where you want to use pygslib, we recommend python 3. Alternatively, you can install Anaconda, but this distribution comes with an unnecessarily large list of packages preinstalled. Both Anaconda and Miniconda work exactly in the same way, the main difference is the size of the distribution. New miniconda and anaconda installers come with python 3.7. To downgrade it with Python 3.6 open a terminal (linux/macOS) or a command prompt (windows) and type the command

conda install python=3.6

The other option is working in a virtual environment. For example,

conda create -n py3.6 python=3.6

To use the environment in windows

conda activate py3.6 

In Linux or macOS

conda source activate py3.6 

For more information on virtual environments visit https://conda.io/docs/user-guide/tasks/manage-environments.html

Installing pygslib in new or existing conda distributions

To install pygslib use the command

conda install pygslib -c opengeostat -c conda-forge

Conda-forge channel is required to get the package dependency ezdxf.

Conda will install and upgrade pygslib dependencies: - python - numpy - pandas >=0.17 - matplotlib - scipy - vtk >=7.1 - ipython - colour - bokeh - ezdxf

Installing some useful python packages

We recommend using pygslib with Jupyter Notebook or Lab.

conda install jupyter jupyterlab

Installing some useful non-python programs

You may need Paraview to visualize drillholes and block models, it is available at https://www.paraview.org/download/