Closed melissamattwig closed 1 year ago
@melissamattwig it looks like it cannot find the jigsaw
library. jigsawpy
is a python wrapper that relies on jigsaw
library to execute meshing commands. You need to install both either from conda repository or from the source code.
Have you successfully executed all the installation steps outlined in the readme? In specific:
python setup.py install_jigsaw
This step requires that you have cmake
and gcc
installed on the machine. This fetches jigsawpy
and jigsaw
source code, builds jigsaw
library and then installs jigsawpy
. It is possible that when you ran this, it failed to build jigsaw
library, but just installed jigsawpy
.
If for any reason the step above cannot be successfully executed in your environment, you can try installing jigsaw
from conda
by (also in the readme):
conda install -c conda-forge jigsaw jigsawpy
I tried installing jigsaw both ways. Using the setup.py, it also threw the same TyperError message in anaconda that I get when trying to import ocsmesh in a Jupyter notebook. Is that because there is no gcc compiler? What is the best way to install gcc through conda if possible? I tried using
conda install -c conda-forge gcc
that I got from the anaconda website but I got a message that it wasn't available on that current channel. I do believe I have cmake. I'm doing this all on my NOAA laptop which I just recently got so I'm starting from scratch but not exactly sure what is included in anaconda and what I need to reinstall every time I create a new virtual environment.
The readme installs it through mamba, which I did for my first try and it didn't work. Then I used the above code that you provided and tried installing it through conda to no avail. All in all, I seem to have issues installing jigsaw just in general. It could be the issue is in the previous installation steps. Since I already had anaconda on my computer (and I'm doing this locally and not on an HPC) before starting this tutorial, I started with the step that installs mamba. Do I need to run the first two blocks of code in the readme file before installing mamba if I already have anaconda on my computer?
Thanks for the detailed description. mamba
and conda
shouldn't really matter in terms of the results. I just used conda
in my previous comment because I didn't want to assume you have mamba
.
About GCC, since I'm using WSL, I usually install it using apt
. I'm not sure what the best way is for conda
. I think what you do above works for linux and mac machines, but for windows you need something else. I don't know what/how.
If jigsaw
is already installed using conda
and it still doesn't work, the problem might just be with how Windows resolves the dll paths. It looks like you're using Anaconda installation on windows, I don't have Anaconda on windows, I'm just using miniconda
on WSL on windows, so I'm not sure how to reproduce the issue on my side. Would it be possible for your to use WSL and setup your conda environment on linux?
Update
I forgot to mention. Can you also try just opening a python session and executing from jigsawpy import jigsaw, libsaw
to make sure we get the exact same error?
Do I need to run the first two blocks of code in the readme file before installing mamba if I already have anaconda on my computer?
No the first two blocks just install conda
I'm starting from scratch but not exactly sure what is included in anaconda and what I need to reinstall every time I create a new virtual environment.
Usually if you don't stack environments (which is done explicitly) each environment is pretty minimal and you should install pretty much all the packages you need.
Just for the sake of completeness:
We investigate this issue further and realized it seems to have something to do with how opening Jupyter using it's GUI in Windows loads the environment vs how this can be done through the command line interface. On Windows, using PowerShell activating the created env (simulation
) and then running jupyter lab
from that console helped resolve the issue.
Further down we realized pyschism
had issue due to dependency on cf
. cf-python
at this point is not released for Windows on conda
and should be installed via pip
, which seems to have some dependecy issues when trying to import cf
.
Since this latter issue is specific to Windows and is not a main blocker for the meshing section of the tutorial, I close this ticket. Later let's create a separate issue for the cf-python
problem.
In the first block of code importing the modules I got this error:
I think it may be something to do with the jigsawpy module but I'm not sure. I'm using the simulation virtual environment that was created for this tutorial, and the files are in the tmp folder that was also created. I was trying to run this in a Jupyter notebook for which the kernel I used was for the simulation virtual environment.
I'm still a bit new to working with virtual environments and the nuances of anaconda so I appreciate the help!