elixir-europe / plant-brapi-to-isa

BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

Dependency issues with numpy #75

Open cpommier opened 1 year ago

cpommier commented 1 year ago

Strange behaviour using pipenv on MacOS 13.0

$ pipenv --python 3.9
$ pipenv install
$ pipenv run python brapi_to_isa.py --help
$ pipenv run python brapi_to_isa.py --help
Traceback (most recent call last):
  File "/Users/cpommier/src/plant-brapi-to-isa/brapi_to_isa.py", line 12, in <module>
    from isatools.convert import isatab2json
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/isatools/__init__.py", line 20, in <module>
    from isatools.convert import (
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/isatools/convert/isatab2cedar.py", line 14, in <module>
    from isatools.io import isatab_parser
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/isatools/io/isatab_parser.py", line 38, in <module>
    from isatools import isatab
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/isatools/isatab.py", line 27, in <module>
    import pandas as pd
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/pandas/__init__.py", line 29, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
  File "/Users/cpommier/.local/share/virtualenvs/plant-brapi-to-isa-NR37vLx-/lib/python3.9/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
  File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Odd fix:

$ pipenv run pip uninstall numpy
$ pipenv run pip install numpy
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.
isatools 0.13.0rc2 requires numpy~=1.21.0, but you have numpy 1.23.4 which is incompatible.
Successfully installed numpy-1.23.4
$ pipenv run python brapi_to_isa.py --help
--> OK
cpommier commented 1 year ago

Not a viable fix on the long run. We have sort off a dependency problem here. It might benefit from isatools 0.13 when it gets published