I tried these commands:
pip install libjpeg8-dev
pip install libjpeg-dev
pip install libjpeg-devel
pip install libjpeg
pip install libjpeg62 libjpeg62-dev
but none of them works. What is the right command with pip?
Use apt-get. As a side note, I was getting errors installing pillow and these commands helped me
sudo apt-get install libjpeg-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev