conda-forge / vtk-feedstock

A conda-smithy repository for vtk.
BSD 3-Clause "New" or "Revised" License
13 stars 64 forks source link

ImportError vtk 9.0.1 #144

Closed Keou0007 closed 1 year ago

Keou0007 commented 4 years ago

Issue: Traceback occurs at import vtk with version 9.0.1 details below are for my installation on macOS. I also see the same bug in CentOS.

File "/Users/shannon/test.py", line 13, in <module>
    import vtk
  File "/Users/shannon/opt/miniconda3/envs/pywakes/lib/python3.8/site-packages/vtk.py", line 30, in <module>
    all_m = importlib.import_module('vtkmodules.all')
  File "/Users/shannon/opt/miniconda3/envs/pywakes/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/shannon/opt/miniconda3/envs/pywakes/lib/python3.8/site-packages/vtkmodules/all.py", line 64, in <module>
    from .vtkIOFFMPEG import *
ImportError: dlopen(/Users/shannon/opt/miniconda3/envs/pywakes/lib/python3.8/site-packages/vtkmodules/vtkIOFFMPEG.cpython-38-darwin.so, 2): Symbol not found: _mp_get_memory_functions
  Referenced from: /Users/shannon/opt/miniconda3/envs/pywakes/lib/libgnutls.30.dylib
  Expected in: /Users/shannon/opt/miniconda3/envs/pywakes/lib/libhogweed.4.dylib
 in /Users/shannon/opt/miniconda3/envs/pywakes/lib/libgnutls.30.dylib


Environment (conda list):

``` asyncssh 2.3.0 py_0 conda-forge blas 2.17 openblas conda-forge bokeh 2.2.1 py38_0 bzip2 1.0.8 h1de35cc_0 ca-certificates 2020.7.22 0 certifi 2020.6.20 py38_0 cffi 1.14.2 py38hed5b41f_0 click 7.1.2 py_0 cloudpickle 1.6.0 py_0 cryptography 3.1 py38hddc9c9b_0 curl 7.71.1 hb0a8c7a_1 cycler 0.10.0 py38_0 cytoolz 0.10.1 py38h1de35cc_0 dask 2.25.0 py_0 dask-core 2.25.0 py_0 decorator 4.4.2 py_0 distributed 2.25.0 py38_0 double-conversion 3.1.5 haf313ee_1 eigen 3.3.7 h04f5b5a_0 expat 2.2.9 hb1e8313_2 ffmpeg 4.3.1 h9903f1f_0 conda-forge filelock 3.0.12 py_0 freetype 2.10.2 ha233b18_0 fsspec 0.8.0 py_0 gettext 0.19.8.1 hb0f4f8b_2 gl2ps 1.4.2 h8da9a1a_0 conda-forge glew 2.1.0 h4a8c4bd_0 conda-forge gmp 6.2.0 hb1e8313_2 conda-forge gnutls 3.6.13 hc269f14_0 conda-forge hdf4 4.2.13 h39711bb_2 hdf5 1.10.6 nompi_haae91d6_101 conda-forge heapdict 1.0.1 py_0 icu 58.2 h0a44026_3 idna 2.10 py_0 imageio 2.9.0 py_0 jinja2 2.11.2 py_0 jpeg 9d h0b31af3_0 conda-forge jsoncpp 1.8.4 h04f5b5a_0 kiwisolver 1.2.0 py38h04f5b5a_0 krb5 1.18.2 h75d18d8_0 lame 3.100 h1de35cc_0 lcms2 2.11 h92f6f08_0 libblas 3.8.0 17_openblas conda-forge libcblas 3.8.0 17_openblas conda-forge libcurl 7.71.1 h8a08a2b_1 libcxx 10.0.1 h5f48129_0 conda-forge libedit 3.1.20191231 h1de35cc_1 libffi 3.3 hb1e8313_2 libgfortran 4.0.0 2 conda-forge libiconv 1.16 h1de35cc_0 liblapack 3.8.0 17_openblas conda-forge liblapacke 3.8.0 17_openblas conda-forge libnetcdf 4.7.4 nompi_hc5b2cf3_105 conda-forge libogg 1.3.2 h1de35cc_0 libopenblas 0.3.10 openmp_h63d9170_3 conda-forge libpng 1.6.37 ha441bb4_0 libssh2 1.9.0 ha12b0ac_1 libtheora 1.1.1 hb4e5f40_1 libtiff 4.1.0 hcb84e12_1 libvorbis 1.3.6 h1de35cc_0 libxml2 2.9.10 h3b9e6c8_1 llvm-openmp 10.0.0 h28b9765_0 locket 0.2.0 py38_1 loguru 0.5.0 py38h32f6830_0 conda-forge lz4-c 1.9.2 hb1e8313_1 markupsafe 1.1.1 py38h1de35cc_1 matplotlib 3.3.1 0 matplotlib-base 3.3.1 py38h181983e_0 msgpack-python 1.0.0 py38h04f5b5a_1 ncurses 6.2 h0a44026_1 nettle 3.4.1 h3018a27_0 networkx 2.5 py_0 numpy 1.19.1 py38ha6d8c68_0 numpy-base 1.19.1 py38h68fea81_0 olefile 0.46 py_0 openh264 2.1.1 hd174df1_0 conda-forge openssl 1.1.1g h1de35cc_0 packaging 20.4 py_0 pandas 1.1.1 py38hb1e8313_0 partd 1.1.0 py_0 pillow 7.2.0 py38ha54b6ba_0 pip 20.2.2 py38_0 proj 7.0.0 h45baca5_5 conda-forge psutil 5.7.2 py38haf1e3a3_0 pugixml 1.10 h4a8c4bd_1 conda-forge pycparser 2.20 py_2 pyparsing 2.4.7 py_0 python 3.8.5 h26836e1_0 python-dateutil 2.8.1 py_0 python_abi 3.8 1_cp38 conda-forge pytz 2020.1 py_0 pywakes 0.11.0 dev_0 pywavelets 1.1.1 py38h1de35cc_0 pyyaml 5.3.1 py38haf1e3a3_1 readline 8.0 h1de35cc_0 scikit-image 0.16.2 py38h6c726b0_0 scipy 1.5.2 py38h1402333_0 conda-forge setuptools 49.6.0 py38_0 six 1.15.0 py_0 sortedcontainers 2.2.2 py_0 sqlite 3.33.0 hffcf06c_0 tbb 2020.2 h879752b_0 tbb-devel 2020.2 h879752b_0 tblib 1.7.0 py_0 tk 8.6.10 hb0a8c7a_0 toolz 0.10.0 py_0 tornado 6.0.4 py38h1de35cc_1 tqdm 4.48.2 py_0 typing_extensions 3.7.4.3 py_0 utfcpp 3.1.1 0 conda-forge vtk 9.0.1 no_osmesa_py38h8de31f5_100 conda-forge wheel 0.35.1 py_0 x264 1!152.20180806 h1de35cc_0 conda-forge xz 5.2.5 h1de35cc_0 yaml 0.2.5 haf1e3a3_0 zict 2.0.0 py_0 zlib 1.2.11 h1de35cc_3 zstd 1.4.5 h41d2c2f_0 ```


Details about conda and system ( conda info ):

``` active environment : test active env location : /Users/shannon/opt/miniconda3/envs/test shell level : 2 user config file : /Users/shannon/.condarc populated config files : /Users/shannon/.condarc conda version : 4.8.4 conda-build version : not installed python version : 3.8.1.final.0 virtual packages : __osx=10.15.6 base environment : /Users/shannon/opt/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch package cache : /Users/shannon/opt/miniconda3/pkgs /Users/shannon/.conda/pkgs envs directories : /Users/shannon/opt/miniconda3/envs /Users/shannon/.conda/envs platform : osx-64 user-agent : conda/4.8.4 requests/2.24.0 CPython/3.8.1 Darwin/19.6.0 OSX/10.15.6 UID:GID : 501:20 netrc file : None offline mode : False ```
Keou0007 commented 3 years ago

I've done some digging and found at this this occurs due to mismatch in packages if condarc channels are set as -defaults and -conda-forge in that priority order. libhogweed comes from the package nettle and nettle has version 3.4.1 available in pkgs/main and 3.7 available in conda-forge. clearly something in vtk 9.0.1 requires a newer version of nettle.

setting a dependency requirement of nettle >= 3.7 should resolve this and force conda to get the conda-forge version of nettle when it installs the conda-forge version of vtk, if default channels are prioritised.

Tobias-Fischer commented 1 year ago

I think we can close this - one should generally not mix defaults with conda-forge channels and this is documented.