-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: numpy.core.multiarray failed to import #210
Comments
It's looks like a numpy version incompatible with polygon |
Hi, Merav @Mrvy29 , Best, |
How did you install py eddy tracker? |
I got it working by having a 3.9 python version, numpy 1.22.4 and netCDF4 1.6.0, matlpotlib 3.7.1. For higher versions of anything it did not work for me at all. |
It's a new environement? |
Yes, i created a new environment for this |
before to install numpy maybe try to install polygon3 |
Hi @berzinastella @AntSimi , I'm sorry it took me so long to get back to this issue. |
Nope , this hasn't solved this issue. here is my code - just to reiterate , using google Colab , py eddy tracker (that was updated probably) does not work properly because of dependency issues. |
Collecting pyEddyTracker |
An update about this issue, using brew and poetry and a pyenv, using python 3.10.13 made the imports all possible without raising API error or grid issues.
|
Related to #217 |
Hi Antoine !
I am really enjoying working with this package , thank you !
I've been using it successfully during the last year and have also started using it with google colab.
I've recently encountered a RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf, it seems some dependencies don't work anymore specifically ImportError: numpy.core.multiarray failed to import which never happened before. I tried to solve it independently but haven't managed to get anywhere and would appreciate your help.
I want to preface that this issue is only relevent with google colab as it requires new installs and doesn't (to my knowledge) allow packages previously installed to be stored for longer term use.
Code for reproduction
Actual outcome
Collecting pyEddyTracker
Downloading pyEddyTracker-3.6.1-py3-none-any.whl (10.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 75.5 MB/s eta 0:00:00
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from pyEddyTracker) (3.7.1)
Requirement already satisfied: opencv-python in /usr/local/lib/python3.10/dist-packages (from pyEddyTracker) (4.8.0.76)
Collecting pint==0.18 (from pyEddyTracker)
Downloading Pint-0.18-py2.py3-none-any.whl (209 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 209.8/209.8 kB 21.5 MB/s eta 0:00:00
Collecting polygon3 (from pyEddyTracker)
Downloading Polygon3-3.0.9.1.tar.gz (39 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from pyEddyTracker) (6.0.1)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from pyEddyTracker) (2.31.0)
Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from pyEddyTracker) (1.10.1)
Collecting zarr (from pyEddyTracker)
Downloading zarr-2.16.0-py3-none-any.whl (206 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 206.5/206.5 kB 20.9 MB/s eta 0:00:00
Collecting netCDF4<1.6 (from pyEddyTracker)
Downloading netCDF4-1.5.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 82.9 MB/s eta 0:00:00
Collecting numpy<1.23 (from pyEddyTracker)
Downloading numpy-1.22.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 78.4 MB/s eta 0:00:00
Collecting numba<0.56 (from pyEddyTracker)
Downloading numba-0.55.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 88.6 MB/s eta 0:00:00
Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from pint==0.18->pyEddyTracker) (23.1)
Collecting cftime (from netCDF4<1.6->pyEddyTracker)
Downloading cftime-1.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 56.8 MB/s eta 0:00:00
Collecting llvmlite<0.39,>=0.38.0rc1 (from numba<0.56->pyEddyTracker)
Downloading llvmlite-0.38.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.5/34.5 MB 17.0 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from numba<0.56->pyEddyTracker) (67.7.2)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (4.42.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (1.4.4)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (9.4.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib->pyEddyTracker) (2.8.2)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->pyEddyTracker) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->pyEddyTracker) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->pyEddyTracker) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->pyEddyTracker) (2023.7.22)
Collecting asciitree (from zarr->pyEddyTracker)
Downloading asciitree-0.3.3.tar.gz (4.0 kB)
Preparing metadata (setup.py) ... done
Collecting fasteners (from zarr->pyEddyTracker)
Downloading fasteners-0.18-py3-none-any.whl (18 kB)
Collecting numcodecs>=0.10.0 (from zarr->pyEddyTracker)
Downloading numcodecs-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.7/6.7 MB 36.9 MB/s eta 0:00:00
Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from numcodecs>=0.10.0->zarr->pyEddyTracker) (0.4)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib->pyEddyTracker) (1.16.0)
Building wheels for collected packages: polygon3, asciitree
Building wheel for polygon3 (setup.py) ... done
Created wheel for polygon3: filename=Polygon3-3.0.9.1-cp310-cp310-linux_x86_64.whl size=117747 sha256=2ed2a779f7bfd5819c2bf07f2b967ac6b2373f1225504fdde44f1137439f5265
Stored in directory: /root/.cache/pip/wheels/d8/b7/f6/b4e24f56a1cc9856dca98cc2fdc3915d7649b39b62f3dbca9e
Building wheel for asciitree (setup.py) ... done
Created wheel for asciitree: filename=asciitree-0.3.3-py3-none-any.whl size=5033 sha256=01af4722698a42e396177776cf77bf120def1124a3b502031fa4b5690a78bf34
Stored in directory: /root/.cache/pip/wheels/7f/4e/be/1171b40f43b918087657ec57cf3b81fa1a2e027d8755baa184
Successfully built polygon3 asciitree
Installing collected packages: polygon3, asciitree, pint, numpy, llvmlite, fasteners, numcodecs, numba, cftime, zarr, netCDF4, pyEddyTracker
Attempting uninstall: numpy
Found existing installation: numpy 1.23.5
Uninstalling numpy-1.23.5:
Successfully uninstalled numpy-1.23.5
Attempting uninstall: llvmlite
Found existing installation: llvmlite 0.39.1
Uninstalling llvmlite-0.39.1:
Successfully uninstalled llvmlite-0.39.1
Attempting uninstall: numba
Found existing installation: numba 0.56.4
Uninstalling numba-0.56.4:
Successfully uninstalled numba-0.56.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
plotnine 0.12.2 requires numpy>=1.23.0, but you have numpy 1.22.4 which is incompatible.
Successfully installed asciitree-0.3.3 cftime-1.6.2 fasteners-0.18 llvmlite-0.38.1 netCDF4-1.5.8 numba-0.55.2 numcodecs-0.11.0 numpy-1.22.4 pint-0.18 polygon3-3.0.9.1 pyEddyTracker-3.6.1 zarr-2.16.0
The text was updated successfully, but these errors were encountered: