conda-forge / libtiff-feedstock

A conda-smithy repository for libtiff.
BSD 3-Clause "New" or "Revised" License
1 stars 25 forks source link

libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0 #104

Closed kevinrue closed 1 week ago

kevinrue commented 3 months ago

Solution to issue cannot be found in the documentation.

Issue

May I redirect you to https://github.com/python-pillow/Pillow/issues/8148 to give you all the details and some additional context without copy pasting here?

I am happy to clarify anything you need to investigate further!

Installed packages

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
absl-py                   2.1.0              pyhd8ed1ab_0    conda-forge
anndata                   0.10.7             pyhd8ed1ab_0    conda-forge
annotated-types           0.7.0              pyhd8ed1ab_0    conda-forge
anyio                     4.3.0              pyhd8ed1ab_0    conda-forge
aom                       3.9.0                hac33072_0    conda-forge
array-api-compat          1.6                pyhd8ed1ab_0    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
blessed                   1.19.1             pyhe4f9e05_2    conda-forge
blosc                     1.21.5               hc2324a3_1    conda-forge
boto3                     1.34.111           pyhd8ed1ab_0    conda-forge
botocore                  1.34.111        pyge38_1234567_0    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0            py39h3d6467e_1    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.28.1               hd590300_0    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
cachecontrol              0.14.0             pyhd8ed1ab_0    conda-forge
cachecontrol-with-filecache 0.14.0             pyhd8ed1ab_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0           py39h7a31438_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
chex                      0.1.86             pyhd8ed1ab_0    conda-forge
cleo                      2.1.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contextlib2               21.6.0             pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1            py39h7633fee_0    conda-forge
crashtest                 0.4.1              pyhd8ed1ab_0    conda-forge
croniter                  1.3.15             pyhd8ed1ab_0    conda-forge
cryptography              42.0.7           py39h8169da8_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dateutils                 0.6.12                     py_0    conda-forge
dav1d                     1.2.1                hd590300_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
deepdiff                  7.0.1              pyhd8ed1ab_0    conda-forge
distlib                   0.3.8              pyhd8ed1ab_0    conda-forge
dnspython                 2.6.1              pyhd8ed1ab_1    conda-forge
docrep                    0.3.2              pyh44b312d_0    conda-forge
dulwich                   0.21.7           py39hd1e30aa_0    conda-forge
email-validator           2.1.1              pyhd8ed1ab_0    conda-forge
email_validator           2.1.1                hd8ed1ab_0    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
etils                     1.6.0              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
expat                     2.6.2                h59595ed_0    conda-forge
fastapi                   0.111.0            pyhd8ed1ab_0    conda-forge
fastapi-cli               0.0.4              pyhd8ed1ab_0    conda-forge
filelock                  3.14.0             pyhd8ed1ab_0    conda-forge
flax                      0.8.3              pyhd8ed1ab_0    conda-forge
fonttools                 4.51.0           py39hd1e30aa_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
fsspec                    2023.12.2          pyhca7485f_0    conda-forge
get-annotations           0.1.2              pyhd8ed1ab_0    conda-forge
gmp                       6.3.0                h59595ed_1    conda-forge
gmpy2                     2.1.5            py39h048c657_1    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0            py39hf3d152e_0    conda-forge
h5py                      3.11.0          nompi_py39h24b94d4_101    conda-forge
hdf5                      1.14.3          nompi_h4f84152_101    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.1.0              pyha770c72_0    conda-forge
importlib-resources       6.4.0              pyhd8ed1ab_0    conda-forge
importlib_metadata        7.1.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
inquirer                  3.1.4              pyhd8ed1ab_0    conda-forge
itsdangerous              2.2.0              pyhd8ed1ab_0    conda-forge
jaraco.classes            3.4.0              pyhd8ed1ab_1    conda-forge
jax                       0.4.27             pyhd8ed1ab_0    conda-forge
jaxlib                    0.4.23          cpu_py39hf4a887c_2    conda-forge
jeepney                   0.8.0              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
jmespath                  1.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
keyring                   24.3.1           py39hf3d152e_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5            py39h7633fee_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 h55db66e_0    conda-forge
legacy-api-wrap           1.4                pyhd8ed1ab_1    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20240116.2      cxx17_h59595ed_0    conda-forge
libaec                    1.1.3                h59595ed_0    conda-forge
libavif16                 1.0.4                hd2f8ffe_4    conda-forge
libblas                   3.9.0           22_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcblas                  3.9.0           22_linux64_openblas    conda-forge
libcurl                   8.8.0                hca28451_0    conda-forge
libdeflate                1.20                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h77fa898_7    conda-forge
libgfortran-ng            13.2.0               h69a702a_7    conda-forge
libgfortran5              13.2.0               hca663fb_7    conda-forge
libglib                   2.80.2               hf974151_0    conda-forge
libgomp                   13.2.0               h77fa898_7    conda-forge
libgrpc                   1.62.2               h15f2491_0    conda-forge
libhwloc                  2.10.0          default_h5622ce7_1001    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           22_linux64_openblas    conda-forge
libllvm14                 14.0.6               hcd5def8_4    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.27          pthreads_h413a1c8_0    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libprotobuf               4.25.3               h08a7969_0    conda-forge
libre2-11                 2023.09.01           h5a48ba9_2    conda-forge
libsqlite                 3.45.3               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               hc0a3c3a_7    conda-forge
libtiff                   4.6.0                h1dd3fc0_3    conda-forge
libtorch                  2.3.0           cpu_generic_h0ec3652_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libuv                     1.48.0               hd590300_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxml2                   2.12.7               hc051c1a_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lightning                 2.0.4              pyhd8ed1ab_0    conda-forge
lightning-cloud           0.5.69             pyhd8ed1ab_0    conda-forge
lightning-utilities       0.11.2             pyhd8ed1ab_0    conda-forge
llvmlite                  0.42.0           py39h174d805_1    conda-forge
loompy                    3.0.6                      py_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5            py39hd1e30aa_0    conda-forge
matplotlib-base           3.8.4            py39h10d1fc8_2    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
ml-collections            0.1.1              pyhd8ed1ab_0    conda-forge
ml_dtypes                 0.4.0            py39hfc16268_1    conda-forge
more-itertools            10.2.0             pyhd8ed1ab_0    conda-forge
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.1                h9458935_1    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.8            py39h95fdab5_0    conda-forge
mudata                    0.2.3              pyhd8ed1ab_0    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
natsort                   8.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
nomkl                     1.0                  h5ca1d4c_0    conda-forge
numba                     0.59.1           py39h615d6bd_0    conda-forge
numpy                     1.26.4           py39h474f0d3_0    conda-forge
numpy_groupies            0.11.1             pyhd8ed1ab_0    conda-forge
numpyro                   0.15.0             pyhd8ed1ab_0    conda-forge
openjpeg                  2.5.2                h488ebb8_0    conda-forge
openpyxl                  3.1.2            py39hd1e30aa_1    conda-forge
openssl                   3.3.0                h4ab18f5_3    conda-forge
opt-einsum                3.3.0                hd8ed1ab_2    conda-forge
opt_einsum                3.3.0              pyhc1e730c_2    conda-forge
optax                     0.2.2              pyhd8ed1ab_0    conda-forge
orbax-checkpoint          0.4.4              pyhd8ed1ab_0    conda-forge
ordered-set               4.1.0              pyhd8ed1ab_0    conda-forge
orjson                    3.10.3           py39ha68c5e3_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2            py39hfc16268_1    conda-forge
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pcre2                     10.43                hcad00b1_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pillow                    10.3.0           py39h90c7501_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkginfo                   1.10.0             pyhd8ed1ab_0    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
poetry                    1.8.3           linux_pyha804496_1    conda-forge
poetry-core               1.9.0              pyhd8ed1ab_0    conda-forge
poetry-plugin-export      1.8.0              pyhd8ed1ab_0    conda-forge
protobuf                  4.25.3           py39h1be52a0_0    conda-forge
psutil                    5.9.8            py39hd1e30aa_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pydantic                  2.7.1              pyhd8ed1ab_0    conda-forge
pydantic-core             2.18.2           py39ha68c5e3_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_1    conda-forge
pynndescent               0.5.12             pyhca7485f_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pyproject_hooks           1.1.0              pyhd8ed1ab_0    conda-forge
pyro-api                  0.1.2              pyhd8ed1ab_0    conda-forge
pyro-ppl                  1.9.0              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.12          h2660328_1_cpython    conda-forge
python-build              1.2.1              pyhd8ed1ab_0    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-editor             1.0.4              pyhd8ed1ab_1    conda-forge
python-fastjsonschema     2.19.1             pyhd8ed1ab_0    conda-forge
python-installer          0.7.0              pyhd8ed1ab_0    conda-forge
python-multipart          0.0.9              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      4_cp39    conda-forge
pytorch                   2.3.0           cpu_generic_py39h87eea44_0    conda-forge
pytorch-lightning         2.2.2              pyhd8ed1ab_0    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1            py39hd1e30aa_1    conda-forge
rapidfuzz                 3.9.1            py39h84cc369_0    conda-forge
rav1e                     0.6.6                he8a937b_2    conda-forge
re2                       2023.09.01           h7f4b329_2    conda-forge
readchar                  4.1.0              pyhd8ed1ab_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.32.2             pyhd8ed1ab_0    conda-forge
requests-toolbelt         1.0.0              pyhd8ed1ab_0    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
s3transfer                0.10.1             pyhd8ed1ab_0    conda-forge
scanpy                    1.10.1             pyhd8ed1ab_0    conda-forge
scikit-learn              1.1.3            py39hd5c8da3_1    conda-forge
scipy                     1.13.0           py39haf93ffa_1    conda-forge
scvelo                    0.3.2              pyhd8ed1ab_1    conda-forge
scvi-tools                1.1.2              pyhd8ed1ab_0    conda-forge
seaborn                   0.13.2               hd8ed1ab_2    conda-forge
seaborn-base              0.13.2             pyhd8ed1ab_2    conda-forge
secretstorage             3.3.3            py39hf3d152e_2    conda-forge
session-info              1.0.0              pyhd8ed1ab_0    conda-forge
setuptools                70.0.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sleef                     3.5.1                h9b69904_2    conda-forge
snappy                    1.2.0                hdb0a2a9_1    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sparse                    0.15.3             pyhd8ed1ab_0    conda-forge
sqlite                    3.45.3               h2c6b66d_0    conda-forge
starlette                 0.37.2             pyhd8ed1ab_0    conda-forge
starsessions              1.3.0              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.2           py39hd92a3bb_0    conda-forge
stdlib-list               0.10.0             pyhd8ed1ab_0    conda-forge
svt-av1                   2.1.0                hac33072_0    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tbb                       2021.12.0            h297d8ca_1    conda-forge
tensorstore               0.1.59           py39heb54d2d_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.5             pyha770c72_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
torchmetrics              1.4.0.post0        pyhd8ed1ab_0    conda-forge
tqdm                      4.66.4             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
trove-classifiers         2024.5.22          pyhd8ed1ab_0    conda-forge
typer                     0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim                0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim-standard       0.12.3               hd8ed1ab_0    conda-forge
types-python-dateutil     2.9.0.20240316     pyhd8ed1ab_0    conda-forge
typing-extensions         4.11.0               hd8ed1ab_0    conda-forge
typing_extensions         4.11.0             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ujson                     5.10.0           py39h84cc369_0    conda-forge
umap-learn                0.5.5            py39hf3d152e_1    conda-forge
unicodedata2              15.1.0           py39hd1e30aa_0    conda-forge
urllib3                   1.26.18            pyhd8ed1ab_0    conda-forge
uvicorn                   0.29.0           py39hf3d152e_0    conda-forge
virtualenv                20.26.2            pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
websocket-client          1.8.0              pyhd8ed1ab_0    conda-forge
websockets                11.0.3           py39hd1e30aa_1    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
xarray                    2024.5.0           pyhd8ed1ab_0    conda-forge
xlrd                      1.2.0              pyh9f0ad1d_1    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Environment info

active environment : base
    active env location : /ceph/project/sims-lab/albrecht/R-cache/R/basilisk/1.17.0/0
            shell level : 1
       user config file : /home/a/albrecht/.condarc
 populated config files : /home/a/albrecht/.condarc
          conda version : 4.12.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __linux=5.15.0=0
                          __glibc=2.35=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /ceph/project/sims-lab/albrecht/R-cache/R/basilisk/1.17.0/0  (writable)
      conda av data dir : /ceph/project/sims-lab/albrecht/R-cache/R/basilisk/1.17.0/0/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          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 : /ceph/project/sims-lab/albrecht/R-cache/R/basilisk/1.17.0/0/pkgs
                          /home/a/albrecht/.conda/pkgs
       envs directories : /ceph/project/sims-lab/albrecht/R-cache/R/basilisk/1.17.0/0/envs
                          /home/a/albrecht/.conda/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.12 Linux/5.15.0-89-generic ubuntu/22.04.4 glibc/2.35
                UID:GID : 20335:20335
             netrc file : None
           offline mode : False
hmaarrfk commented 3 months ago

How do i run a line of python code that triggers jpeg12_write_raw_data? That is still unclear to me.

kevinrue commented 3 months ago

Thanks for the reply. Happy to provide any information I can.

I'm afraid our latest working conda environment is quite old and many dependencies have incremented many versions in the meantime, so it's hard to pinpoint what changed. I don't want to distract you with unnecessary or irrelevant details, but please ask anything that I can provide to help!

hmaarrfk commented 3 months ago

ok i'll wait for your reproducer to take any further action.

peterch405 commented 1 week ago

I have been having the same issue.

! ImportError: /opt/conda/envs/scil3extfig/lib/python3.10/site-packages/PIL/../../../libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0

My conda env with the error:

python=3.10.14 libtiff=4.6.0 pillow=10.0.1 matplotlib=3.8.4 numpy=1.26.4 cooltools=0.5.2 pairtools=1.0.3 cooler=0.9.3 bioframe=0.6.4 pygenometracks=3.3 tqdm seaborn=0.13.2 pandas=1.5.3

Downgrading tolibtiff=4.5.1 and pillow=10.0.0 fixed the issue.

kevinrue commented 1 week ago

@peterch405 you sir are a star ⭐

Here's my adaptation of your fix: https://github.com/kevinrue/jurassicpark/commit/0ca8eecb909e2224546cd7e655a4baf89e17601f

Which passed github action here https://github.com/kevinrue/velociraptor/actions/runs/11051037022/job/30700081490?pr=91

Thanks a million for solving something I've struggled with for months!

hmaarrfk commented 1 week ago

@peterch405 it seems you are using bioconda, i can't really help with that unfortunately. it is likely best if we try to narrow down the problem on conda-forge first, then if it can't be reproduced, raise an issue with bioconda.

Narrowing down your recreator to things available on conda-forge:

mamba create --name test python=3.10.14 libtiff=4.6.0 pillow=10.0.1 --channel conda-forge --override-channels
mamba activate test
python -c "from PIL import Image"
mamba install python=3.10.14 libtiff=4.6.0 pillow=10.0.1 matplotlib=3.8.4 numpy=1.26.4 tqdm seaborn=0.13.2 pandas=1.5.3 --channel conda-forge --override-channels
python -c "from PIL import Image"

Both seem to work on my linux machine.

mamba list ``` $ mamba list # packages in environment at /home/mark/miniforge3/envs/test: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge alsa-lib 1.2.12 h4ab18f5_0 conda-forge attr 2.5.1 h166bdaf_1 conda-forge brotli 1.1.0 hb9d3cd8_2 conda-forge brotli-bin 1.1.0 hb9d3cd8_2 conda-forge bzip2 1.0.8 h4bc722e_7 conda-forge ca-certificates 2024.8.30 hbcca054_0 conda-forge cairo 1.18.0 h3faef2a_0 conda-forge certifi 2024.8.30 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge contourpy 1.3.0 py310h3788b33_2 conda-forge cycler 0.12.1 pyhd8ed1ab_0 conda-forge dbus 1.13.6 h5008d03_3 conda-forge expat 2.6.3 h5888daf_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 h77eed37_2 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.54.1 py310ha75aee5_0 conda-forge freetype 2.12.1 h267a509_2 conda-forge gettext 0.22.5 he02047a_3 conda-forge gettext-tools 0.22.5 he02047a_3 conda-forge glib 2.80.5 h2ff4ddf_0 conda-forge glib-tools 2.80.5 h4833e2c_0 conda-forge graphite2 1.3.13 h59595ed_1003 conda-forge gst-plugins-base 1.24.4 h9ad1361_0 conda-forge gstreamer 1.24.4 haf2f30d_0 conda-forge harfbuzz 8.5.0 hfac3d4d_0 conda-forge icu 73.2 h59595ed_0 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.7 py310h3788b33_0 conda-forge krb5 1.21.3 h659f571_0 conda-forge lame 3.100 h166bdaf_1003 conda-forge lcms2 2.16 hb7c19ff_0 conda-forge ld_impl_linux-64 2.43 h712a8e2_1 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libasprintf 0.22.5 he8f35ee_3 conda-forge libasprintf-devel 0.22.5 he8f35ee_3 conda-forge libblas 3.9.0 24_linux64_openblas conda-forge libbrotlicommon 1.1.0 hb9d3cd8_2 conda-forge libbrotlidec 1.1.0 hb9d3cd8_2 conda-forge libbrotlienc 1.1.0 hb9d3cd8_2 conda-forge libcap 2.69 h0f662aa_0 conda-forge libcblas 3.9.0 24_linux64_openblas conda-forge libclang-cpp15 15.0.7 default_h127d8a8_5 conda-forge libclang13 19.1.0 default_h9c6a7e4_0 conda-forge libcups 2.3.3 h4637d8d_4 conda-forge libdeflate 1.21 h4bc722e_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libevent 2.1.12 hf998b51_1 conda-forge libexpat 2.6.3 h5888daf_0 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libflac 1.4.3 h59595ed_0 conda-forge libgcc 14.1.0 h77fa898_1 conda-forge libgcc-ng 14.1.0 h69a702a_1 conda-forge libgcrypt 1.11.0 h4ab18f5_1 conda-forge libgettextpo 0.22.5 he02047a_3 conda-forge libgettextpo-devel 0.22.5 he02047a_3 conda-forge libgfortran 14.1.0 h69a702a_1 conda-forge libgfortran-ng 14.1.0 h69a702a_1 conda-forge libgfortran5 14.1.0 hc5f4f2c_1 conda-forge libglib 2.80.5 h2ff4ddf_0 conda-forge libgomp 14.1.0 h77fa898_1 conda-forge libgpg-error 1.50 h4f305b6_0 conda-forge libiconv 1.17 hd590300_2 conda-forge libjpeg-turbo 3.0.0 hd590300_1 conda-forge liblapack 3.9.0 24_linux64_openblas conda-forge libllvm15 15.0.7 hb3ce162_4 conda-forge libllvm19 19.1.0 ha7bfdaf_0 conda-forge libnsl 2.0.1 hd590300_0 conda-forge libogg 1.3.5 h4ab18f5_0 conda-forge libopenblas 0.3.27 pthreads_hac2b453_1 conda-forge libopus 1.3.1 h7f98852_1 conda-forge libpng 1.6.44 hadc24fc_0 conda-forge libpq 16.4 h2d7952a_1 conda-forge libsndfile 1.2.2 hc60ed4a_1 conda-forge libsqlite 3.46.1 hadc24fc_0 conda-forge libstdcxx 14.1.0 hc0a3c3a_1 conda-forge libstdcxx-ng 14.1.0 h4852527_1 conda-forge libsystemd0 256.6 h2774228_0 conda-forge libtiff 4.6.0 h46a8edc_4 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libwebp-base 1.4.0 hd590300_0 conda-forge libxcb 1.15 h0b41bf4_0 conda-forge libxcrypt 4.4.36 hd590300_1 conda-forge libxkbcommon 1.7.0 h662e7e4_0 conda-forge libxml2 2.12.7 h4c95cb1_3 conda-forge libzlib 1.3.1 h4ab18f5_1 conda-forge lz4-c 1.9.4 hcb278e6_0 conda-forge matplotlib 3.8.4 py310hff52083_2 conda-forge matplotlib-base 3.8.4 py310hef631a5_2 conda-forge mpg123 1.32.6 h59595ed_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mysql-common 8.3.0 h70512c7_5 conda-forge mysql-libs 8.3.0 ha479ceb_5 conda-forge ncurses 6.5 he02047a_1 conda-forge nspr 4.35 h27087fc_0 conda-forge nss 3.104 hd34e28f_0 conda-forge numpy 1.26.4 py310hb13e2d6_0 conda-forge openjpeg 2.5.2 h488ebb8_0 conda-forge openssl 3.3.2 hb9d3cd8_0 conda-forge packaging 24.1 pyhd8ed1ab_0 conda-forge pandas 1.5.3 py310h9b08913_1 conda-forge patsy 0.5.6 pyhd8ed1ab_0 conda-forge pcre2 10.44 hba22ea6_2 conda-forge pillow 10.0.1 py310h01dd4db_2 conda-forge pip 24.2 pyh8b19718_1 conda-forge pixman 0.43.2 h59595ed_0 conda-forge ply 3.11 pyhd8ed1ab_2 conda-forge pthread-stubs 0.4 hb9d3cd8_1002 conda-forge pulseaudio-client 17.0 hb77b528_0 conda-forge pyparsing 3.1.4 pyhd8ed1ab_0 conda-forge pyqt 5.15.9 py310h04931ad_5 conda-forge pyqt5-sip 12.12.2 py310hc6cd4ac_5 conda-forge python 3.10.14 hd12c33a_0_cpython conda-forge python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge python_abi 3.10 5_cp310 conda-forge pytz 2024.2 pyhd8ed1ab_0 conda-forge qt-main 5.15.8 hc9dc06e_21 conda-forge readline 8.2 h8228510_1 conda-forge scipy 1.14.1 py310ha3fb0e1_0 conda-forge seaborn 0.13.2 hd8ed1ab_2 conda-forge seaborn-base 0.13.2 pyhd8ed1ab_2 conda-forge setuptools 75.1.0 pyhd8ed1ab_0 conda-forge sip 6.7.12 py310hc6cd4ac_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge statsmodels 0.14.3 py310hf462985_1 conda-forge tk 8.6.13 noxft_h4845f30_101 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.4.1 py310ha75aee5_1 conda-forge tqdm 4.66.5 pyhd8ed1ab_0 conda-forge tzdata 2024a h8827d51_1 conda-forge unicodedata2 15.1.0 py310h2372a71_0 conda-forge wheel 0.44.0 pyhd8ed1ab_0 conda-forge xcb-util 0.4.0 hd590300_1 conda-forge xcb-util-image 0.4.0 h8ee46fc_1 conda-forge xcb-util-keysyms 0.4.0 h8ee46fc_1 conda-forge xcb-util-renderutil 0.3.9 hd590300_1 conda-forge xcb-util-wm 0.4.1 h8ee46fc_1 conda-forge xkeyboard-config 2.42 h4ab18f5_0 conda-forge xorg-kbproto 1.0.7 hb9d3cd8_1003 conda-forge xorg-libice 1.1.1 hd590300_0 conda-forge xorg-libsm 1.2.4 h7391055_0 conda-forge xorg-libx11 1.8.9 h8ee46fc_0 conda-forge xorg-libxau 1.0.11 hb9d3cd8_1 conda-forge xorg-libxdmcp 1.1.3 hb9d3cd8_1 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxrender 0.9.11 hd590300_0 conda-forge xorg-renderproto 0.11.1 hb9d3cd8_1003 conda-forge xorg-xextproto 7.3.0 hb9d3cd8_1004 conda-forge xorg-xf86vidmodeproto 2.3.1 hb9d3cd8_1003 conda-forge xorg-xproto 7.0.31 hb9d3cd8_1008 conda-forge xz 5.2.6 h166bdaf_0 conda-forge zlib 1.3.1 h4ab18f5_1 conda-forge zstd 1.5.6 ha6fb4c9_0 conda-forge ```

If you can create a similar reproducer:

  1. Create an environment with mamba env create --name test --channel conda-forge --override-channel THE_PACKAGES
  2. mamba activate
  3. python -c "some import statement"

we can resume the issue.

Otherwise I'm tempted to keep this closed :(

kevinrue commented 1 week ago

@hmaarrfk

He may have been using bioconda but thanks to his suggestion, I've built a pure conda-forge environment that solves my issue, see https://github.com/kevinrue/jurassicpark/actions/runs/11051833674/job/30702589157#step:8:38

I hope that helps!

peterch405 commented 6 days ago

libtiff' andpillow' both came from conda-forge. Bioconda is only used for the other packages that aren't available from conda-forge.

The bug is probably not in conda-forge and probably not even in libtiff.

For completeness, the bug for me arises from a very specific use case and could be in reticulate, rmarkdown, or a number of other packages, I honestly don't know. To reproduce for any other poor soul to get this error:

test.Rmd (add code blocks, not sure how to include them here):

---
title: "test"
output: html_document
---

{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(reticulate)
use_condaenv("libtiff_test")

{python}
import seaborn as sns

test_2.Rmd (add code blocks):

---
title: "test"
output: html_document
---

{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(reticulate)
use_condaenv("libtiff_test_2")

{python}
import seaborn as sns

Dockerfile:

FROM rocker/tidyverse:4.3.0

RUN apt-get update
RUN apt-get install -y \
    libpng-dev

ARG MINIFORGE_NAME=Miniforge3
ARG MINIFORGE_VERSION=24.7.1-0
ARG TARGETPLATFORM

ENV CONDA_DIR=/opt/conda
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH=${CONDA_DIR}/bin:${PATH}

RUN apt-get update > /dev/null && \
    apt-get install --no-install-recommends --yes \
        wget bzip2 ca-certificates \
        git \
        tini \
        > /dev/null && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    wget --no-hsts --quiet https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/${MINIFORGE_NAME}-${MINIFORGE_VERSION}-Linux-$(uname -m).sh -O /tmp/miniforge.sh && \
    /bin/bash /tmp/miniforge.sh -b -p ${CONDA_DIR} && \
    rm /tmp/miniforge.sh && \
    conda clean --tarballs --index-cache --packages --yes && \
    find ${CONDA_DIR} -follow -type f -name '*.a' -delete && \
    find ${CONDA_DIR} -follow -type f -name '*.pyc' -delete && \
    conda clean --force-pkgs-dirs --all --yes  && \
    echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> /etc/skel/.bashrc && \
    echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc

RUN mamba create -n libtiff_test -y python=3.10.14 libtiff=4.5.1 pillow=10.0.0 matplotlib=3.8.4 seaborn=0.13.2 && \
mamba clean --all -y

RUN mamba create -n libtiff_test_2 -y python=3.10.14 libtiff=4.6.0 pillow=10.0.1 matplotlib=3.8.4 seaborn=0.13.2 && \
mamba clean --all -y

RUN Rscript -e "install.packages('remotes', repos = 'https://cran.rstudio.com')"
RUN Rscript -e "remotes::install_version('reticulate', version = '1.35.0', repos = 'https://cran.rstudio.com')"

COPY ./test.Rmd /test.Rmd
COPY ./test_2.Rmd /test_2.Rmd

Works:

docker exec <container_name> mamba run -n libtiff_test python -c 'import seaborn'
docker exec <container_name> mamba run -n libtiff_test_2 python -c 'import seaborn'

Even this works:

docker exec <container_name> Rscript -e "library(reticulate); use_condaenv('libtiff_test'); import('seaborn')"
docker exec <container_name> Rscript -e "library(reticulate); use_condaenv('libtiff_test_2'); import('seaborn')"

test_2.Rmd fails:

docker exec <container_name> Rscript -e "rmarkdown::render('test.Rmd')"
docker exec <container_name> Rscript -e "rmarkdown::render('test_2.Rmd')"

Full error:

Error in `py_call_impl()`:
! ImportError: /opt/conda/envs/libtiff_test_2/lib/python3.10/site-packages/PIL/../../../libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0
Run `reticulate::py_last_error()` for details.
Backtrace:
  1. rmarkdown::render("test_2.Rmd")
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  3. knitr:::process_file(text, output)
  7. knitr:::process_group.block(group)
  8. knitr:::call_block(x)
     ...
 12. knitr (local) engine(options)
 13. reticulate::eng_python(options)
 14. reticulate:::py_compile_eval(snippet, compile_mode)
 17. builtins$eval(compiled, globals, locals)
 18. reticulate:::py_call_impl(callable, call_args$unnamed, call_args$named)
Execution halted

Additional note, I get the same error with quarto=1.5.57.

hmaarrfk commented 6 days ago

hmm i'm sorry, this is beyond me. I think you should open an other issue (just copy paste this) so that an other person can come chime in and help.

The OP closed this issue, so I think it would better help you if you opened your own....

kevinrue commented 4 days ago

Hi.

Happy to re-open this issue if it saves any duplication of effort / information.

I only closed this issue because I finally got to a combination of conda package versions that avoids the problem, and I personally gave up on trying to understand where the issue originates.