Getting Started with SimPEG#
Installing Python#
SimPEG is written in Python! This means we need Python in order to run SimPEG. We highly recommend installing a Python distribution like Miniforge that will install the Python interpreter along with the conda package manager.
Note
Miniforge is a community-driven alternative to Anaconda, a well-known Python distribution.
We recommend Miniforge over Anaconda because it’s more lightweight and
because it makes use of the conda-forge community-led channel to download
packages. Downloading packages from Anaconda (usually refered as the
default
channel) requires us to adhere to their Terms of Service.
Make sure to read them and their FAQs if you decide to
still use Anaconda.
See also
If you are starting with Python and want to learn more and feel more comfortable with the language, we recommend checking out Software Carpentry’s lessons.
Installing SimPEG#
Conda Forge#
SimPEG is available through conda-forge and you can install is using the conda package manager that comes with Miniforge (or Anaconda):
conda install --channel conda-forge simpeg
Note
Installing through conda
is our recommended method of installation.
Note
Since version 23.10.0,
conda
makes use of the libmamba
solver to resolve dependencies. It
makes creation of environments and installation of new packages much faster
than when using older versions of conda
.
Since this version, conda
can achieve the same performance as
mamba
, so there’s no need to install mamba
if you have an updated
version of conda
.
If not, either update conda, or
keep using mamba
instead.
PyPi#
SimPEG is on pypi! First, make sure your version of pip is up-to-date
pip install --upgrade pip
Then you can install SimPEG
pip install simpeg
To update SimPEG, you can run
pip install --upgrade simpeg
Installing from Source#
First (you need git):
git clone https://github.com/simpeg/simpeg
Second (from the root of the SimPEG repository):
pip install .
If you are interested in contributing to SimPEG, please check out the page on Contributing
Success?#
If you have been successful at downloading and installing SimPEG, you should be able to download and run any of the examples and tutorials.
If not, you can reach out to other people developing and using SimPEG on our Mattermost channel or in our Discourse forum.
Useful Links#
An enormous amount of information (including tutorials and examples) can be found on the official websites of the packages
Python for scientific computing#
Python for Scientists Links to commonly used packages, Matlab to Python comparison
Python Wiki Lists packages and resources for scientific computing in Python
Numpy and Matlab#
Lessons in Python#
Editing Python#
There are numerous ways to edit and test Python (see PythonWiki for an overview) and in our group at least the following options are being used: