I have been trying to install Pillow-SIMD (https://github.com/uploadcare/pillow-simd) inside a conda environment:
git clone https://github.com/uploadcare/pillow-simd.git
cd pillow-simd
CC="cc -mavx2" python setup.py install --user
(--user
because I don't have the rights to modify the conda environment)
Installation went without errors, but when using it I obtained:
Wrong JPEG library version: library is 90, caller expects 62
I turns out that I have three versions of libjpeg
on my system:
- One in
~/.local/
as a result of my installation oflibjpeg-turbo
. - One in
/lib64/
, which I have no control of. - One in the conda environment:
/home/anaconda-py3/envs/python-3.10.4/lib/
.
And Pillow-SIMD was built with the last one:
(python-3.10.4) ldd build/lib.linux-x86_64-cpython-310/PIL/_imaging.cpython-310-x86_64-linux-gnu.so
linux-vdso.so.1 (0x00007ffe31bd4000)
libjpeg.so.9 => /home/anaconda-py3/envs/python-3.10.4/lib/libjpeg.so.9 (0x00007fc40f8ca000)
My question is how to force it to use the first version, i.e., what's inside ~/.local
?
Thank you so much in advance for your help!
Edit: Please note that by bashrc
had already been configured:
(python-3.10.4) cat ~/.bash_profile
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PATH=$HOME/.local/cuda-11.7/bin:$HOME/.local/bin:$PATH
export LD_LIBRARY_PATH=$HOME/.local/cuda-11.7/lib64:$HOME/.local/lib:$HOME/.local/lib64:/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$HOME/.local/cuda-11.7/pkgconfig:$HOME/.local/lib/pkgconfig:$HOME/.local/lib64/pkgconfig:/lib64/pkgconfig:$PKG_CONFIG_PATH
export CPATH=$HOME/.local/include:$CPATH