Forked from soumith/gist:01da3874bf014d8a8c53406c2b95d56b
Created
May 9, 2019 11:55
-
-
Save ruslangrimov/a2ae8a3eee74d01c3a6b5080fa79336f to your computer and use it in GitHub Desktop.
Install PillowSIMD+libjpeg-turbo on Conda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda uninstall --force pillow -y | |
# install libjpeg-turbo to $HOME/turbojpeg | |
git clone https://github.com/libjpeg-turbo/libjpeg-turbo | |
pushd libjpeg-turbo | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg | |
make | |
make install | |
popd | |
# install pillow-simd with jpeg-turbo support | |
git clone https://github.com/uploadcare/pillow-simd | |
pushd pillow-simd | |
CPATH=$HOME/turbojpeg/include LIBRARY_PATH=$HOME/turbojpeg/lib CC="cc -mavx2" python setup.py install | |
# add turbojpeg to LD_LIBRARY_PATH | |
export LD_LIBRARY_PATH="$HOME/turbojpeg/lib:$LD_LIBRARY_PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment