conda-forge / pynio-feedstock

A conda-smithy repository for pynio.
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

pynio import error #96

Closed styxptyx closed 3 years ago

styxptyx commented 3 years ago

Issue: 1) Fresh install of Ubuntu 20.04.1 2) Fresh Install of miniconda3 (latest - from repo.anaconda.com/miniconda) 3) conda install -c conda-forge pynio 4) When I run :

import Nio Traceback (most recent call last): File "", line 1, in File "/opt/miniconda3/lib/python3.8/site-packages/PyNIO/Nio.py", line 83, in from _nio import * ImportError: libtbb.so.2: cannot open shared object file: No such file or directory


Environment (conda list):

``` $ conda list # Name Version Build Channel _libgcc_mutex 0.1 main boost-cpp 1.72.0 h8e57a91_0 conda-forge brotlipy 0.7.0 py38h27cfd23_1003 bzip2 1.0.8 h516909a_3 conda-forge c-ares 1.17.1 h36c2ea0_0 conda-forge ca-certificates 2020.12.5 ha878542_0 conda-forge cairo 1.16.0 hcf35c78_1003 conda-forge certifi 2020.12.5 py38h578d9bd_1 conda-forge cffi 1.14.3 py38h261ae71_2 cfitsio 3.470 h2e3daa1_7 conda-forge chardet 3.0.4 py38h06a4308_1003 conda 4.9.2 py38h578d9bd_0 conda-forge conda-package-handling 1.7.2 py38h03888b9_0 cryptography 3.2.1 py38h3c74f83_1 curl 7.71.1 he644dc0_8 conda-forge esmf 8.0.0 nompi_hb0fcdcb_6 conda-forge expat 2.2.9 he1b5a44_2 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.4 h7ca028e_0 conda-forge freexl 1.0.5 h516909a_1002 conda-forge g2clib 1.6.0 hf3f1b0b_9 conda-forge geos 3.8.1 he1b5a44_0 conda-forge geotiff 1.5.1 h05acad5_10 conda-forge gettext 0.19.8.1 h5e8e0c9_1 conda-forge giflib 5.2.1 h36c2ea0_2 conda-forge glib 2.66.1 h92f7085_0 gsl 2.6 hf94e986_0 conda-forge hdf4 4.2.13 hf30be14_1003 conda-forge hdf5 1.10.5 nompi_h7c3c948_1111 conda-forge hdfeos2 2.20 h64bfcee_1000 conda-forge hdfeos5 5.1.16 h8b6279f_6 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.10 py_0 jasper 1.900.1 h07fcdf6_1006 conda-forge jpeg 9d h36c2ea0_0 conda-forge json-c 0.13.1 hbfbb72e_1002 conda-forge kealib 1.4.13 hec59c27_0 conda-forge krb5 1.17.2 h926e7f8_0 conda-forge ld_impl_linux-64 2.33.1 h53a641e_7 libblas 3.9.0 7_openblas conda-forge libcblas 3.9.0 7_openblas conda-forge libcurl 7.71.1 hcdd3856_8 conda-forge libdap4 3.20.6 h1d1bd15_1 conda-forge libedit 3.1.20191231 h14c3975_1 libev 4.33 h516909a_1 conda-forge libffi 3.3 he6710b0_2 libgcc-ng 9.1.0 hdf63c60_0 libgdal 3.0.4 h3dfc09a_6 conda-forge libgfortran-ng 7.5.0 h14aa051_18 conda-forge libgfortran4 7.5.0 h14aa051_18 conda-forge libiconv 1.16 h516909a_0 conda-forge libkml 1.3.0 hd79254b_1012 conda-forge liblapack 3.9.0 7_openblas conda-forge libnetcdf 4.7.4 nompi_h9f9fd6a_101 conda-forge libnghttp2 1.41.0 h8cfc5f6_2 conda-forge libopenblas 0.3.12 pthreads_hb3c22a3_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 12.3 h255efa7_3 conda-forge libspatialite 4.3.0a h2482549_1038 conda-forge libssh2 1.9.0 hab1572f_5 conda-forge libstdcxx-ng 9.1.0 hdf63c60_0 libtiff 4.1.0 h4f3a223_6 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libwebp-base 1.1.0 h36c2ea0_3 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxml2 2.9.10 hee79883_0 conda-forge lz4-c 1.9.2 he1b5a44_3 conda-forge ncl 6.6.2 hfe5c2fd_21 conda-forge ncurses 6.2 he6710b0_1 netcdf-fortran 4.5.2 nompi_h45d7149_104 conda-forge numpy 1.19.4 py38hf0fd68c_1 conda-forge openjpeg 2.3.1 h981e76c_3 conda-forge openssl 1.1.1h h516909a_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pip 20.2.4 py38h06a4308_0 pixman 0.38.0 h516909a_1003 conda-forge poppler 0.67.0 h14e79db_8 conda-forge poppler-data 0.4.10 0 conda-forge postgresql 12.3 hc2f5b80_3 conda-forge proj 7.0.0 h966b41f_5 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pycosat 0.6.3 py38h7b6447c_1 pycparser 2.20 py_2 pyngl 1.6.1 py38h174697a_2 conda-forge pynio 1.5.5 py38h031d99c_12 conda-forge pyopenssl 19.1.0 pyhd3eb1b0_1 pysocks 1.7.1 py38h06a4308_0 python 3.8.5 h7579374_1 python_abi 3.8 1_cp38 conda-forge readline 8.0 h7b6447c_0 requests 2.24.0 py_0 ruamel_yaml 0.15.87 py38h7b6447c_1 setuptools 50.3.1 py38h06a4308_1 six 1.15.0 py38h06a4308_0 sqlite 3.33.0 h62c20be_0 tiledb 1.7.7 h8efa9f0_2 conda-forge tk 8.6.10 hbc83047_0 tqdm 4.51.0 pyhd3eb1b0_0 tzcode 2020a h516909a_0 conda-forge udunits2 2.2.27.6 h4e0c4b3_1001 conda-forge urllib3 1.25.11 py_0 wheel 0.35.1 pyhd3eb1b0_0 xerces-c 3.2.2 h8412b87_1004 conda-forge xorg-imake 1.0.7 0 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.12 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxaw 1.0.13 h516909a_1002 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxmu 1.1.3 h516909a_0 conda-forge xorg-libxpm 3.5.13 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-libxt 1.1.5 h516909a_1003 conda-forge xorg-makedepend 1.0.6 he1b5a44_1 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.5 h7b6447c_0 yaml 0.2.5 h7b6447c_0 zlib 1.2.11 h7b6447c_3 zstd 1.4.5 h6597ccf_2 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : None user config file : /home/styx/.condarc populated config files : conda version : 4.9.2 conda-build version : not installed python version : 3.8.5.final.0 virtual packages : __glibc=2.31=0 __unix=0=0 __archspec=1=x86_64 base environment : /opt/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /opt/miniconda3/pkgs /home/styx/.conda/pkgs envs directories : /opt/miniconda3/envs /home/styx/.conda/envs platform : linux-64 user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Linux/5.4.0-42-generic ubuntu/20.04.1 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
ocefpaf commented 3 years ago

Please read the conda-forge documentation, this is a classic channel mixing problem. You have many packages that are not from conda-forge.

styxptyx commented 3 years ago

Thank you for your reply. If I understand correctly, with a fresh install with only the operating system (Ubuntu), miniconda3 and pynio / pyngl, without any other install, it is normal that this does not work? This is not what I observed during my previous installations.

It is true that if I do an installation in a virtual environment the import of pynio works fine :

conda create --name myenv -c conda-forge pynio conda activate myenv python -c 'import Nio'

But this necessarily implies working with a virtual environment and agreeing to work only with conda-forge. I think it would have been interesting to understand why what worked perfectly before does not work anymore.

ocefpaf commented 3 years ago

But this necessarily implies working with a virtual environment and agreeing to work only with conda-forge.

Yes.

I think it would have been interesting to understand why what worked perfectly before does not work anymore.

With multiple dependencies fro multiple channels it is quite unlikely to figure out the problem and if you do, the solution would still be the same: get the packages from a compatible source.