Download it from https://github.com/uber-research/jpeg2dct and compile it in the virtualenv --python=/usr/bin/python3.7 myenv environment variable. In these two directories(/usr/lib & /lib/x86_64-linux-gnu
) libjpeg.so -> libjpeg.so.9.4.0 must be selected as system libraries. Compile the jpeg2dct library and make sure it is installed under myenv /lib/python3.7/site-packages/jpeg2dct$. Check the dependencies of the .so file in jpeg2dct.common with ldd. When you see libjpeg.so -> libjpeg.so.9.4.0 you are done.