conda-forge / cf_units-feedstock

A conda-smithy repository for cf_units.
BSD 3-Clause "New" or "Revised" License
0 stars 12 forks source link

Failed to open UDUNITS-2 XML unit database, on Linux #36

Open lguez opened 3 years ago

lguez commented 3 years ago

Issue:

I installed with:

conda create -n iris -c conda-forge iris
conda activate iris
conda install -c conda-forge ipython
conda install -c conda-forge PyQt

If I run ipython and import cf_units, it works. But if I add the option --matplotlib to ipython, it fails to open UDUNITS-2 XML unit database:

``` $ ipython --matplotlib Python 3.9.0 | packaged by conda-forge | (default, Oct 14 2020, 22:59:50) Type 'copyright', 'credits' or 'license' for more information IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help. Using matplotlib backend: Qt5Agg In [1]: import cf_units --------------------------------------------------------------------------- UdunitsError Traceback (most recent call last) /mnt/Licorne/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 187 try: --> 188 _ud_system = _ud.read_xml() 189 except _ud.UdunitsError: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: UdunitsError Traceback (most recent call last) /mnt/Licorne/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 194 try: --> 195 _ud_system = _ud.read_xml(_alt_xml_path.encode()) 196 except _ud.UdunitsError as e: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) in ----> 1 import cf_units /mnt/Licorne/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 196 except _ud.UdunitsError as e: 197 error_msg = ': "%s"' % e.error_msg() if e.errnum else '' --> 198 raise OSError( 199 '[%s] Failed to open UDUNITS-2 XML unit database%s' 200 % (e.status_msg(), error_msg)) OSError: [UT_PARSE] Failed to open UDUNITS-2 XML unit database ```

I saw that this problem has been reported before as Windows-specific. But I am on Linuxmint 20.


Environment (conda list):

``` $ conda list # packages in environment at /mnt/Licorne/miniconda3/envs/iris: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge antlr-python-runtime 4.7.2 py39hde42818_1002 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.1 py_0 conda-forge bokeh 2.2.3 py39hf3d152e_0 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.17.1 h36c2ea0_0 conda-forge ca-certificates 2020.11.8 ha878542_0 conda-forge cartopy 0.18.0 py39h32a4312_6 conda-forge certifi 2020.11.8 py39hf3d152e_0 conda-forge cf-units 2.1.4 py39h1dff97c_2 conda-forge cftime 1.3.0 py39h16ac069_0 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge cloudpickle 1.6.0 py_0 conda-forge curl 7.71.1 he644dc0_8 conda-forge cycler 0.10.0 py_2 conda-forge cytoolz 0.11.0 py39hbd71b63_1 conda-forge dask 2.30.0 py_0 conda-forge dask-core 2.30.0 py_0 conda-forge dbus 1.13.6 hfdff14a_1 conda-forge decorator 4.4.2 py_0 conda-forge distributed 2.30.1 py39hf3d152e_0 conda-forge expat 2.2.9 he1b5a44_2 conda-forge fontconfig 2.13.1 h7e3eb15_1002 conda-forge freetype 2.10.4 h7ca028e_0 conda-forge fsspec 0.8.4 py_0 conda-forge geos 3.8.1 he1b5a44_0 conda-forge gettext 0.19.8.1 hf34092f_1004 conda-forge glib 2.66.3 h58526e2_0 conda-forge gst-plugins-base 1.14.5 h0935bb2_2 conda-forge gstreamer 1.14.5 h36ae1b5_2 conda-forge hdf4 4.2.13 h10796ff_1004 conda-forge hdf5 1.10.6 nompi_h6a2412b_1112 conda-forge heapdict 1.0.1 py_0 conda-forge icu 67.1 he1b5a44_0 conda-forge ipython 7.19.0 py39hef51801_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge iris 2.4.0 py39hf3d152e_1 conda-forge jedi 0.17.2 py39hf3d152e_1 conda-forge jinja2 2.11.2 pyh9f0ad1d_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge kiwisolver 1.3.1 py39h081fc7a_0 conda-forge krb5 1.17.2 h926e7f8_0 conda-forge lcms2 2.11 hcbb858e_1 conda-forge ld_impl_linux-64 2.35.1 hed1e6ac_0 conda-forge libblas 3.9.0 3_openblas conda-forge libcblas 3.9.0 3_openblas conda-forge libclang 10.0.1 default_hde54327_1 conda-forge libcurl 7.71.1 hcdd3856_8 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 hcdb4288_3 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.3.0 h5dbcf3e_17 conda-forge libgfortran-ng 9.3.0 he4bcb1c_17 conda-forge libgfortran5 9.3.0 he4bcb1c_17 conda-forge libglib 2.66.3 hbe7bbb4_0 conda-forge libgomp 9.3.0 h5dbcf3e_17 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 3_openblas conda-forge libllvm10 10.0.1 he513fc3_3 conda-forge libnetcdf 4.7.4 nompi_hefab0ff_106 conda-forge libnghttp2 1.41.0 h8cfc5f6_2 conda-forge libopenblas 0.3.12 pthreads_h4812303_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 12.3 h5513abc_2 conda-forge libssh2 1.9.0 hab1572f_5 conda-forge libstdcxx-ng 9.3.0 h2ae2ef3_17 conda-forge 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 libxkbcommon 0.10.0 he1b5a44_0 conda-forge libxml2 2.9.10 h68273f3_2 conda-forge locket 0.2.0 py_2 conda-forge lz4-c 1.9.2 he1b5a44_3 conda-forge markupsafe 1.1.1 py39h38d8fee_2 conda-forge matplotlib-base 3.3.3 py39h98787fa_0 conda-forge msgpack-python 1.0.0 py39h081fc7a_2 conda-forge mysql-common 8.0.21 2 conda-forge mysql-libs 8.0.21 hf3661c5_2 conda-forge ncurses 6.2 h58526e2_4 conda-forge netcdf4 1.5.4 nompi_py39hb3be4b9_103 conda-forge nspr 4.29 he1b5a44_1 conda-forge nss 3.59 h2c00c37_0 conda-forge numpy 1.19.4 py39h57d35e7_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openssl 1.1.1h h516909a_0 conda-forge packaging 20.7 pyhd3deb0d_0 conda-forge pandas 1.1.4 py39h9cfe711_0 conda-forge parso 0.7.1 pyh9f0ad1d_0 conda-forge partd 1.1.0 py_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 8.0.1 py39h397ff4d_0 conda-forge pip 20.3.1 pyhd8ed1ab_0 conda-forge proj 7.1.1 h966b41f_3 conda-forge prompt-toolkit 3.0.8 pyha770c72_0 conda-forge psutil 5.7.3 py39h38d8fee_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge pygments 2.7.2 py_0 conda-forge pyke 1.1.1 pyhd8ed1ab_1004 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyqt 5.12.3 py39h03dd644_4 conda-forge pyqt5-sip 4.19.18 pypi_0 pypi pyqtchart 5.12 pypi_0 pypi pyqtwebengine 5.12.1 pypi_0 pypi pyshp 2.1.2 pyh9f0ad1d_0 conda-forge python 3.9.0 h2a148a8_4_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python-xxhash 2.0.0 py39h07f9747_1 conda-forge python_abi 3.9 1_cp39 conda-forge pytz 2020.4 pyhd8ed1ab_0 conda-forge pyyaml 5.3.1 py39h38d8fee_1 conda-forge qt 5.12.9 h1f2b2cb_0 conda-forge readline 8.0 he28a2e2_2 conda-forge scipy 1.5.3 py39hee8e79c_0 conda-forge setuptools 49.6.0 py39h079e4ff_2 conda-forge shapely 1.7.1 py39hfa2dc8b_1 conda-forge six 1.15.0 pyh9f0ad1d_0 conda-forge sortedcontainers 2.3.0 pyhd8ed1ab_0 conda-forge sqlite 3.34.0 h74cdb3f_0 conda-forge tblib 1.6.0 py_0 conda-forge tk 8.6.10 hed695b0_1 conda-forge toolz 0.11.1 py_0 conda-forge tornado 6.1 py39hbd71b63_0 conda-forge traitlets 5.0.5 py_0 conda-forge typing_extensions 3.7.4.3 py_0 conda-forge tzdata 2020d h516909a_0 conda-forge udunits2 2.2.27.6 h4e0c4b3_1001 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge wheel 0.36.1 pyhd3deb0d_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xxhash 0.8.0 h7f98852_1 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h516909a_0 conda-forge zict 2.0.0 py_0 conda-forge zlib 1.2.11 h516909a_1010 conda-forge zstd 1.4.5 h6597ccf_2 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : iris active env location : /mnt/Licorne/miniconda3/envs/iris shell level : 1 user config file : /home/guez/.condarc populated config files : /home/guez/.condarc conda version : 4.9.2 conda-build version : not installed python version : 3.8.3.final.0 virtual packages : __glibc=2.31=0 __unix=0=0 __archspec=1=x86_64 base environment : /mnt/Licorne/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 : /mnt/Licorne/miniconda3/pkgs /home/guez/.conda/pkgs envs directories : /mnt/Licorne/miniconda3/envs /home/guez/.conda/envs platform : linux-64 user-agent : conda/4.9.2 requests/2.25.0 CPython/3.8.3 Linux/5.4.0-56-generic linuxmint/20 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
ocefpaf commented 3 years ago

Looking at your config I see that you have your environment at /mnt/Licorne/miniconda3/envs/iris and your home at /home/guez/.condarc. I know that we had similar issues on Windows when users had similar configurations using different drives. Never got a report on Linux though.

Can you try having them in the same mounted partition just to confirm that is the problem?

lguez commented 3 years ago

I trashed my whole conda installation, reinstalled miniconda in my home directory, reinstalled the environment iris with the same packages and I get the same error:

``` $ ipython --matplotlib Python 3.9.0 | packaged by conda-forge | (default, Oct 14 2020, 22:59:50) Type 'copyright', 'credits' or 'license' for more information IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help. Using matplotlib backend: Qt5Agg In [1]: import cf_units --------------------------------------------------------------------------- UdunitsError Traceback (most recent call last) ~/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 187 try: --> 188 _ud_system = _ud.read_xml() 189 except _ud.UdunitsError: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: UdunitsError Traceback (most recent call last) ~/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 194 try: --> 195 _ud_system = _ud.read_xml(_alt_xml_path.encode()) 196 except _ud.UdunitsError as e: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) in ----> 1 import cf_units ~/miniconda3/envs/iris/lib/python3.9/site-packages/cf_units/__init__.py in 196 except _ud.UdunitsError as e: 197 error_msg = ': "%s"' % e.error_msg() if e.errnum else '' --> 198 raise OSError( 199 '[%s] Failed to open UDUNITS-2 XML unit database%s' 200 % (e.status_msg(), error_msg)) OSError: [UT_PARSE] Failed to open UDUNITS-2 XML unit database ```

New output from conda list after reinstallation:

``` # packages in environment at /home/guez/miniconda3/envs/iris: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge antlr-python-runtime 4.7.2 py39hde42818_1002 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.1 py_0 conda-forge bokeh 2.2.3 py39hf3d152e_0 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.17.1 h36c2ea0_0 conda-forge ca-certificates 2020.12.5 ha878542_0 conda-forge cartopy 0.18.0 py39h32a4312_6 conda-forge certifi 2020.12.5 py39hf3d152e_0 conda-forge cf-units 2.1.4 py39h1dff97c_2 conda-forge cftime 1.3.0 py39h16ac069_0 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge cloudpickle 1.6.0 py_0 conda-forge curl 7.71.1 he644dc0_8 conda-forge cycler 0.10.0 py_2 conda-forge cytoolz 0.11.0 py39hbd71b63_1 conda-forge dask 2.30.0 py_0 conda-forge dask-core 2.30.0 py_0 conda-forge dbus 1.13.6 hfdff14a_1 conda-forge decorator 4.4.2 py_0 conda-forge distributed 2.30.1 py39hf3d152e_0 conda-forge expat 2.2.9 he1b5a44_2 conda-forge fontconfig 2.13.1 h7e3eb15_1002 conda-forge freetype 2.10.4 h7ca028e_0 conda-forge fsspec 0.8.4 py_0 conda-forge geos 3.8.1 he1b5a44_0 conda-forge gettext 0.19.8.1 hf34092f_1004 conda-forge glib 2.66.3 h58526e2_0 conda-forge gst-plugins-base 1.14.5 h0935bb2_2 conda-forge gstreamer 1.14.5 h36ae1b5_2 conda-forge hdf4 4.2.13 h10796ff_1004 conda-forge hdf5 1.10.6 nompi_h6a2412b_1112 conda-forge heapdict 1.0.1 py_0 conda-forge icu 67.1 he1b5a44_0 conda-forge ipython 7.19.0 py39hef51801_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge iris 2.4.0 py39hf3d152e_1 conda-forge jedi 0.17.2 py39hf3d152e_1 conda-forge jinja2 2.11.2 pyh9f0ad1d_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge kiwisolver 1.3.1 py39h081fc7a_0 conda-forge krb5 1.17.2 h926e7f8_0 conda-forge lcms2 2.11 hcbb858e_1 conda-forge ld_impl_linux-64 2.35.1 hed1e6ac_0 conda-forge libblas 3.9.0 3_openblas conda-forge libcblas 3.9.0 3_openblas conda-forge libclang 10.0.1 default_hde54327_1 conda-forge libcurl 7.71.1 hcdd3856_8 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 hcdb4288_3 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.3.0 h5dbcf3e_17 conda-forge libgfortran-ng 9.3.0 he4bcb1c_17 conda-forge libgfortran5 9.3.0 he4bcb1c_17 conda-forge libglib 2.66.3 hbe7bbb4_0 conda-forge libgomp 9.3.0 h5dbcf3e_17 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 3_openblas conda-forge libllvm10 10.0.1 he513fc3_3 conda-forge libnetcdf 4.7.4 nompi_hefab0ff_106 conda-forge libnghttp2 1.41.0 h8cfc5f6_2 conda-forge libopenblas 0.3.12 pthreads_h4812303_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 12.3 h5513abc_2 conda-forge libssh2 1.9.0 hab1572f_5 conda-forge libstdcxx-ng 9.3.0 h2ae2ef3_17 conda-forge 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 libxkbcommon 0.10.0 he1b5a44_0 conda-forge libxml2 2.9.10 h68273f3_2 conda-forge locket 0.2.0 py_2 conda-forge lz4-c 1.9.2 he1b5a44_3 conda-forge markupsafe 1.1.1 py39h38d8fee_2 conda-forge matplotlib-base 3.3.3 py39h98787fa_0 conda-forge msgpack-python 1.0.0 py39h081fc7a_2 conda-forge mysql-common 8.0.21 2 conda-forge mysql-libs 8.0.21 hf3661c5_2 conda-forge ncurses 6.2 h58526e2_4 conda-forge netcdf4 1.5.4 nompi_py39hb3be4b9_103 conda-forge nspr 4.29 he1b5a44_1 conda-forge nss 3.59 h2c00c37_0 conda-forge numpy 1.19.4 py39h57d35e7_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openssl 1.1.1h h516909a_0 conda-forge packaging 20.7 pyhd3deb0d_0 conda-forge pandas 1.1.4 py39h9cfe711_0 conda-forge parso 0.7.1 pyh9f0ad1d_0 conda-forge partd 1.1.0 py_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 8.0.1 py39h397ff4d_0 conda-forge pip 20.3.1 pyhd8ed1ab_0 conda-forge proj 7.1.1 h966b41f_3 conda-forge prompt-toolkit 3.0.8 pyha770c72_0 conda-forge psutil 5.7.3 py39h38d8fee_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge pygments 2.7.2 py_0 conda-forge pyke 1.1.1 pyhd8ed1ab_1004 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyqt 5.12.3 py39h03dd644_4 conda-forge pyqt5-sip 4.19.18 pypi_0 pypi pyqtchart 5.12 pypi_0 pypi pyqtwebengine 5.12.1 pypi_0 pypi pyshp 2.1.2 pyh9f0ad1d_0 conda-forge python 3.9.0 h2a148a8_4_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python-xxhash 2.0.0 py39h07f9747_1 conda-forge python_abi 3.9 1_cp39 conda-forge pytz 2020.4 pyhd8ed1ab_0 conda-forge pyyaml 5.3.1 py39h38d8fee_1 conda-forge qt 5.12.9 h1f2b2cb_0 conda-forge readline 8.0 he28a2e2_2 conda-forge scipy 1.5.3 py39hee8e79c_0 conda-forge setuptools 49.6.0 py39h079e4ff_2 conda-forge shapely 1.7.1 py39hfa2dc8b_1 conda-forge six 1.15.0 pyh9f0ad1d_0 conda-forge sortedcontainers 2.3.0 pyhd8ed1ab_0 conda-forge sqlite 3.34.0 h74cdb3f_0 conda-forge tblib 1.6.0 py_0 conda-forge tk 8.6.10 hed695b0_1 conda-forge toolz 0.11.1 py_0 conda-forge tornado 6.1 py39hbd71b63_0 conda-forge traitlets 5.0.5 py_0 conda-forge typing_extensions 3.7.4.3 py_0 conda-forge tzdata 2020d h516909a_0 conda-forge udunits2 2.2.27.6 h4e0c4b3_1001 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge wheel 0.36.1 pyhd3deb0d_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xxhash 0.8.0 h7f98852_1 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h516909a_0 conda-forge zict 2.0.0 py_0 conda-forge zlib 1.2.11 h516909a_1010 conda-forge zstd 1.4.5 h6597ccf_2 conda-forge ```

New output from conda info after reinstallation:

``` active environment : iris active env location : /home/guez/miniconda3/envs/iris shell level : 1 user config file : /home/guez/.condarc populated config files : /home/guez/.condarc 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 : /home/guez/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 : /home/guez/miniconda3/pkgs /home/guez/.conda/pkgs envs directories : /home/guez/miniconda3/envs /home/guez/.conda/envs platform : linux-64 user-agent : conda/4.9.2 requests/2.25.0 CPython/3.8.5 Linux/5.4.0-56-generic linuxmint/20 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
ocefpaf commented 3 years ago

I just tried:

conda create --name TEST python=3.9 iris ipython pyqt --channel conda-forge --yes
conda activate TEST
ipython --matplotlib

and it worked:

> ipython --matplotlib
Python 3.9.0 | packaged by conda-forge | (default, Oct 14 2020, 22:59:50) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
Using matplotlib backend: TkAgg

In [1]: import iris
In [2]: import cf_units

The packages are virtually the same as the ones in your setup. Maybe the problem is in your ipython+matplotlib config file. Anything in there that could be the culprint?

lguez commented 3 years ago

Yes, I have:

$ cat ~/.config/matplotlib/matplotlibrc 
backend: Qt5Agg
ocefpaf commented 3 years ago

That should not matter but can you try TkAgg just to eliminate that possibility?

lguez commented 3 years ago

The problem disappears when I replace Qt5Agg by TkAgg in my file matplotlibrc.

lguez commented 3 years ago

Can you reproduce the problem with Qt5Agg?

ocefpaf commented 3 years ago

Nope. Works for me too :-/

bjlittle commented 2 years ago

@lguez Apologies for being late to the party here...

Is this still an issue for you?

We've made several changes since you raised this issue to improve the robustness of installing cf-units. I'm curious as to whether this is now a solved problem.

Can you please confirm either way, thanks :+1:

Note that, you can now pip install cf-units as binary wheels on both linux x86_64, and macos x86_64 and arm64.

lguez commented 2 years ago

Hello. I have just tried again creating the conda environment and importing cf_units. I still have the same error.