Closed zippylab closed 2 years ago
Looks like you have an environment with a big mix of packages from conda-forge and defaults; there's probably some conflict that's causing the core dump. What happens if you create a new environment using just conda-forge:
conda create -n testenv python=3.9 matplotlib
conda activate testenv
python -c 'import matplotlib.pyplot as plt'
@dopplershift That does work without error, but it seems like that is kind of equivalent to what I also observed worked: creating the clean miniconda env then installing matplotlib without specifying conda-forge as repo.
That testenv does show a different package environment, without all the conda-forge ones mixed in. However, I believe all the ones brought in from conda-forge in my original package environment listing were those that are installed along with matplotlib itself (i.e., I think all the conda-forge items in the original list stemmed from installing matplotlib from conda-forge).
(testenv) login-1(~)> conda list
# packages in environment at /home/zippy/miniconda3/envs/testenv:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 4.5 1_gnu
blas 1.0 mkl
brotli 1.0.9 he6710b0_2
ca-certificates 2022.3.29 h06a4308_0
certifi 2021.10.8 py39h06a4308_2
cycler 0.11.0 pyhd3eb1b0_0
dbus 1.13.18 hb2f20db_0
expat 2.4.4 h295c915_0
fontconfig 2.13.1 h6c09931_0
fonttools 4.25.0 pyhd3eb1b0_0
freetype 2.11.0 h70c0345_0
giflib 5.2.1 h7b6447c_0
glib 2.69.1 h4ff587b_1
gst-plugins-base 1.14.0 h8213a91_2
gstreamer 1.14.0 h28cd5cc_2
icu 58.2 he6710b0_3
intel-openmp 2021.4.0 h06a4308_3561
jpeg 9d h7f8727e_0
kiwisolver 1.3.2 py39h295c915_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.35.1 h7274673_9
libffi 3.3 he6710b0_2
libgcc-ng 9.3.0 h5101ec6_17
libgomp 9.3.0 h5101ec6_17
libpng 1.6.37 hbc83047_0
libstdcxx-ng 9.3.0 hd4cf53a_17
libtiff 4.2.0 h85742a9_0
libuuid 1.0.3 h7f8727e_2
libwebp 1.2.2 h55f646e_0
libwebp-base 1.2.2 h7f8727e_0
libxcb 1.14 h7b6447c_0
libxml2 2.9.12 h03d6c58_0
lz4-c 1.9.3 h295c915_1
matplotlib 3.5.1 py39h06a4308_1
matplotlib-base 3.5.1 py39ha18d171_1
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py39h7f8727e_0
mkl_fft 1.3.1 py39hd3c417c_0
mkl_random 1.2.2 py39h51133e4_0
munkres 1.1.4 py_0
ncurses 6.3 h7f8727e_2
numpy 1.21.2 py39h20f2e39_0
numpy-base 1.21.2 py39h79a1101_0
openssl 1.1.1n h7f8727e_0
packaging 21.3 pyhd3eb1b0_0
pcre 8.45 h295c915_0
pillow 9.0.1 py39h22f2fdc_0
pip 21.2.4 py39h06a4308_0
pyparsing 3.0.4 pyhd3eb1b0_0
pyqt 5.9.2 py39h2531618_6
python 3.9.12 h12debd9_0
python-dateutil 2.8.2 pyhd3eb1b0_0
qt 5.9.7 h5867ecd_1
readline 8.1.2 h7f8727e_1
setuptools 58.0.4 py39h06a4308_0
sip 4.19.13 py39h295c915_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.38.2 hc218d9a_0
tk 8.6.11 h1ccaba5_0
tornado 6.1 py39h27cfd23_0
tzdata 2022a hda174b7_0
wheel 0.37.1 pyhd3eb1b0_0
xz 5.2.5 h7b6447c_0
zlib 1.2.11 h7f8727e_4
zstd 1.4.9 haebb681_0
(testenv) login-1(~)>
Running an environment that contains a mix of packages from both the defaults
channel and the conda-forge
channel is not a configuration that we support, specifically because it often results in hard to debug problems like this one. The fact that using packages from the conda-forge
channel works fine indicates that everything is working as intended.
If someone can point out something that we're doing wrong here, I'm happy to merge a PR fixing it. There are so many possible causes for this kind of crash (incompatible C libraries, compiler flags, linked library versions, etc.) when running in an environment with packages from the defaults
channel. In the end, the cause of the incompatibility likely can't even be resolved in this recipe.
The conda-forge
channel at this point should have everything, so is there some reason you want to run a mix?
@dopplershift No reason I want/need to run a mix. Maybe the issue is I'm not setting up the bare starting-point miniconda environment the right way, so that it has only conda-forge packages? I was just using the installer script from repo.anaconda.com:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x ./Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
....
My usual way is to add the conda-forge
channel and then install things into other environments (though at this point my base environment is all conda-forge):
conda config --add channels conda-forge
conda update -n base --all
You could also install using our pre-configured "miniforge" installers: https://github.com/conda-forge/miniforge/releases/
Solution to issue cannot be found in the documentation.
Issue
Creating a clean miniconda environment, and only installing the matplotlib package from conda-forge like this:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
conda install -c conda-forge matplotlib
leads to an environment where importing matplotlib kills the python kernel:
If, instead of installing matplotlib from conda-forge, I omit the
-c conda-forge
and let conda choose a default repo, the matplotlib package installed works fine.Installed packages
Environment info