Closed emma97956461 closed 2 days ago
Did you get same error when you do an import netCDF4
?
How did you install py eddy tracker?
No I didn't get any error when importing netcdf4, I tried installing pyeddytracker in multiple ways: on my local machine, both from terminal with pip and homebrew, and directly from jupyterlab. I also work on remote machines and tried there, in the same ways. I always encountered some kind of issue when importing the dataset.grid, which is either related to numpy or netcdf4. Today I thought the problem was solved, but after restarting my kernel I find that I can't even import py_eddy_tracker anymore, because of numpy; I get the error: AttributeError: module 'numpy' has no attribute 'ndarray' Thank you for the help
I am having an issue with py_eddy_tracker.dataset.grid as well.
I had to recreate the py-eddy-tracker environment after a system upgrade in the remote machine. I created the environment from the environment.yml file:
conda env create --file environment.yml
conda activate binder-pyeddytracker
python setup.py install
The error that comes for me:
ImportError Traceback (most recent call last)
Cell In[2], line 23
21 from py_eddy_tracker.gui import GUI
22 from py_eddy_tracker.tracking import Correspondances
---> 23 from py_eddy_tracker.dataset.grid import UnRegularGridDataset
24 from py_eddy_tracker.eddy_feature import Contours
File ~/miniconda3/envs/binder-pyeddytracker/lib/python3.10/site-packages/py_eddy_tracker/dataset/grid.py:8
5 from datetime import datetime
6 import logging
----> 8 from cv2 import filter2D
9 from matplotlib.path import Path as BasePath
10 from netCDF4 import Dataset
File ~/miniconda3/envs/binder-pyeddytracker/lib/python3.10/site-packages/cv2/__init__.py:181
176 if DEBUG: print("Extra Python code for", submodule, "is loaded")
178 if DEBUG: print('OpenCV loader: DONE')
--> 181 bootstrap()
File ~/miniconda3/envs/binder-pyeddytracker/lib/python3.10/site-packages/cv2/__init__.py:153, in bootstrap()
149 if DEBUG: print("Relink everything from native cv2 module to cv2 package")
151 py_module = sys.modules.pop("cv2")
--> 153 native_module = importlib.import_module("cv2")
155 sys.modules["cv2"] = py_module
156 setattr(py_module, "_native", native_module)
File ~/miniconda3/envs/binder-pyeddytracker/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Did you have same error if you only do (env creation must install also py eddy tracker package):
conda env create --file environment.yml
conda activate binder-pyeddytracker
Yes
I don't know how to solve cv2 install problem, i am not able to reproduce this pb on several platform
Hello Antoine, we got the same issue during an installation in Jupyterhub, and it seems that
pip install opencv-python-headless
solved the issue.
thanks