Running resistive casing

I have cloned a python library for casing modeling using instructions provided in a README.md file:
Step 1:
git clone GitHub - simpeg-research/lbnl-2019-resistive-casing: A notebook which runs a frequency domain electromagnetic simulation for a current-dipole inside of a resistive casing
Step 2:
cd lbnl-2019-resistive-casing
Step 3:
conda env create -f environment.yml
Step 4:
conda activate lbnl-resistive-casing

after this I open jupyter notebook and try to run " Modelling a resistive casing - magnetic dipole source"

and get the following error in the first cell

ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_5612/2993768688.py in
12
13 # SimPEG, discretize
—> 14 import discretize
15 from discretize import utils
16 from SimPEG.electromagnetics import frequency_domain as fdem

ModuleNotFoundError: No module named ‘discretize’

So somehow the install has not loaded the appropriate *.py file into the AppData\Local\Temp dir.

Any thoughts on what I have done wrong?

thanks very much.

Hi Mike,

Apologies for the late reply! I neglected to pin software versions with these earlier repositories that you mention here and in Versions of packages. I will go back and work to pin those.

However, if you are interested in getting up and running with some of the casing simulations, I would recommend using the code that we distributed with the recent leading edge issue: GitHub - simpeg-research/heagy-2021-tle-casing

These notebooks are much more up-to-date with the latest advancements in SimPEG.

Hi Lindsey,

I would like to ask a question about how to install the latest casing simulation code. During the installation (conda env create -f environment.yml), I got an error message shown below. Could you take a look and suggest trouble shooting steps? Thanks for your help.

Evan

Preparing transaction: done
Verifying transaction: done
Executing transaction: - Enabling notebook extension jupyter-js-widgets/extension…
- Validating: ok

done
Installing pip dependencies: | Ran pip subprocess with arguments:
[‘C:\Users\esum\Anaconda3\envs\heagy-2021-tle-casing\python.exe’, ‘-m’, ‘pip’, ‘install’, ‘-U’, ‘-r’, ‘C:\Users\esum\heagy-2021-tle-casing\condaenv.avbnr5d6.requirements.txt’]
Pip subprocess output:
Collecting git+https://github.com/simpeg/simpeg.git@tdem-cleanup (from -r C:\Users\esum\heagy-2021-tle-casing\condaenv.avbnr5d6.requirements.txt (line 1))
Cloning GitHub - simpeg/simpeg: Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications. (to revision tdem-cleanup) to c:\users\esum\appdata\local\temp\pip-req-build-e1e3pwm7

Pip subprocess error:
Running command git clone --filter=blob:none --quiet GitHub - simpeg/simpeg: Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications. ‘C:\Users\esum\AppData\Local\Temp\pip-req-build-e1e3pwm7’
WARNING: Did not find branch or tag ‘tdem-cleanup’, assuming revision or ref.
Running command git checkout -q tdem-cleanup
error: pathspec ‘tdem-cleanup’ did not match any file(s) known to git
error: subprocess-exited-with-error

× git checkout -q tdem-cleanup did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git checkout -q tdem-cleanup did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

failed

CondaEnvException: Pip failed