Issue
I'm trying to use a script (not mine) in Jupyter, using pyGIMLi in it.
I installed pyGIMLi according to the instructions here: https://www.pygimli.org/installation.html. I used the first set of instructions, using conda. So I now have the pyGIMLi saved as an environment in my Anaconda Navigator.
I opened the script I am going to use in Jupyter Notebook and tried to run it, but the error "ModuleNotFoundError: No module named 'pygimli'" was displayed instead.
I do not have a lot of experience with programming, so kindly keep this in mind when answering. I tried restarting the computer, but this did not change anything.
What might be the problem here?
Solution
It seems like the Jupyter Notebook might be running in a different environment than the one where you installed pygimli
.
Here's a step-to-step guide to run your Jupyter Notebook in the correct conda environment:
Activate the
pygimli
environment in your terminal. If the environment was namedpg
, the command would beconda activate pg
.After activating the environment, start the Jupyter Notebook from the same terminal by running
jupyter notebook
. This should open a new Jupyter Notebook in your default web browser.From here, open the notebook you want to work with.
Your Jupyter notebook should now be able to access the pygimli
module because it is running in the same environment where the module was installed.
Remember, every time you want to use the module, you should activate the pg
environment first then start Jupyter Notebook from there.
If the problem persists, it's possible that the pygimli
module was not installed correctly. Try reinstalling it in your conda environment, and ensure the installation process completed without errors.
Good luck!
Answered By - Robin Thibaut
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.