Python conda installation/environment options

SeanWalker Posts: 23 Calcite Rank Badge
edited March 2023 in Oasis montaj

I was wondering what people are doing when it comes to developing python tools for Oasis Montaj.

1) do you use the minconda installation in the Geosoft folder or
2) do you use another python installation on your machine and use pip to install the geosoft package

I can see the benefits of both.

I would assume that 1) works well as it has been tested by Seequent developers. If you want to use other packages like Jupyter notebooks or an IDE like Spyder you could install that inside the Geosoft installation folder but it will be overwritten when you update and you will need to rebuild your environment. Not the end of the world, but also not great. So I am leaning toward what I used to do (ie option 2) but was wondering what others are doing.



  • NickWilliams
    NickWilliams Posts: 27 Calcite Rank Badge
    edited October 2020
    Sean, I had a hell of a time getting Python and Geosoft set up again recently. I found there's a bug with the current Geosoft 9.8 Python installation that they have a work-around for, which complicated things.

    Short answer: I use my own Anaconda installation with two Geosoft-capable environments: one with Geosoft installed from pip, and one with Geosoft pulled from GitHub and modified to fix a couple of bugs. I don't want to have to re-setup my Python installations and environment every time Geosoft updates.

    I would be interested to hear why Geosoft included a Python install. I assume it was more to do with the recent visualization changes than opening it up for developers to use.
  • SeanWalker
    Thanks Nick. I think the reason it is included is that some menu items inside OM (like the export to OMF from 3D view) run Python code. This is how I found out the python install was broken.
  • PetriValasti
    Sean, where is "minconda installation in the Geosoft folder"? 

    I installed Anaconda from but it seems that it did not setup it automatically in a way that I could just start using it. For example, pip does not work ("unable to create process") even though I am in folder where pip resides. I uninstalled Anaconda and re-installed with include PATH option checked but it did not work after that either (not sure how PATH should look after installation although; I did not see anything about Anaconda when I typed 'path' in cmd). Anaconda got installed for invidual user in 

    Any hints appreciated. :)

  • SeanWalker
    Hi Petri, You can find it here (at least in the most recent release of OM v9.9.1). C:\Program Files\Geosoft\Desktop Applications 9\python
    My experience is that this python installation is not added to the path (if you open a command prompt and type python nothing happens (or actually Microsoft sends you to their app store to download python). However, in the Start>Program list (or whatever that thing is called) there is an Anaconda3(64 bit) entry and it should have a command prompt and powershell entry with the tag (python). If you open one of these you should have access to the Geosoft python miniconda installation. From there if you type python and then import geosoft it work. I am a bit wary of adding any packages to this environment because I am not sure how much python functionality is happening in OM these days behind the scenes. The 3D map export to OMF is definitely a python script and there are likely others. As Nick mentioned he likes to keep things separate if he is playing around with stuff.
    Hope this helps
  • PetriValasti
    Ok, thanx Sean. I still have Oasis montaj 9.5, waiting for 9.9 installation.

    I start realizing that my problems have something to do that Anaconda environment is not activated Managing environments — conda 4.9.2.post24+e37cf84a documentation This is more tricky that I wished. :) 

  • BartHoekstra
    Hi Sean,

    Is the miniconda environment installed when Oasis is installed?  The miniconda options are not available in the start menu unless I run the miniconda executable in the geosoft directory, but then the packages - numpy, geosoft aren't installed.  I would like to send a python script to a customer and want to make sure they will have the same packages I have installed.