I'm trying to install Pillow on Ubuntu 14.04 using this command:
pip install Pillow
but the installation fails with this error:
ValueError: --enable-jpeg requested but jpeg not found, aborting.
The problem was that the package libjpeg-dev was not installed. To solve the problem you should do this:
sudo apt-get install libjpeg-dev
Make sure Python-development packages are installed, if not then install it using the following commands :
For Ubuntu
sudo apt-get install python3-dev python3-setuptools
For Fedora
sudo dnf install python-devel
After installing the development packages install the following :
For Ubuntu
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
For Fedora
sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel
You have to install the missing dependencies and libraries that Pillow requires for it to work. Find the dependencies here
This are the current dependancies/libraries for Ubuntu 14.04 for Pilllow 3.0.0+. Install them by running the command below
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
There may be a problem where pip is relying on a cached version of the dependencies, and clearing the cache can sometimes solve the problem. Just type
$ rm -rf ~/.cache/pip
Source: github issue
You need to follow this tutorial Install pillow doc.
If you had installed, just uninstall and reinstall again:
$ pip uninstall pillow
$ pip install pillow --no-cache-dir
Related
I'm trying to install docker-registry. I got stuck after this:
$ apt-get install python-pip python-dev
$ pip install -r requirements.txt
[...]
backports/lzma/_lzmamodule.c:115:18: fatal error: lzma.h: No such file or directory
The docker-registry I downloaded is v0.6.7
$ apt-get install -y liblzma-dev
On Centos the package is
yum install -y xz-devel
For OSX with Homebrew.
brew install xz
The formula is xz which because lzma formula is deprecated, since it became a part of xz.
And finally on RedHat (I tested it on RHEL 7.4)
yum install -y xz-devel
Help me, all
I have some error while installation of pycurl on ubuntu 18,04
I tried follow as:
apt-cache depends python-pycurl
sudo apt install libcurl4-gnutls-dev
apt-cache search gnutl | grep dev
sudo apt-get install libgnutls-dev
sudo apt install python-pycurl
pip install pycurl
but, failed to install.
Thanks!
I fixed it.
sudo apt-get install libssl-dev libcurl4-openssl-dev python3.8-dev
and by referring to these links Error in installation pycurl 7.19.0, https://github.com/pycurl/pycurl/issues/596.
In addtion, my python version is 3.8, so I installed python3.8-dev.
I came across a tutorial which lists a number of libraries to install before installing Django (I am using Ubuntu 14.04, Python3, and Django 1.8):
$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get install -y build-essential
$ sudo apt-get install python-setuptools python-dev python3.4-dev python-software-properties libpq-dev
$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev
$ sudo apt-get build-dep python-imaging
But other tutorials may not list so many libraries to install. I wonder which are absolutely necessary, and others may be omitted?
You only need to install these dependencies if you want image processing via pillow and if you plan on installing it via pip (the Python package manager) rather than apt-get (Ubuntu's package manager).
Since you're using a virtualenv, you will need to install this package from source. The following commands will get the build dependencies and install pillow using pip.
$ sudo apt-get build-dep python3-imaging
$ pip install pillow
Note that pillow is a beast to compile. Be prepared to wait several minutes.
I'm trying to install docker-registry. I got stuck after this:
$ apt-get install python-pip python-dev
$ pip install -r requirements.txt
[...]
backports/lzma/_lzmamodule.c:115:18: fatal error: lzma.h: No such file or directory
The docker-registry I downloaded is v0.6.7
$ apt-get install -y liblzma-dev
On Centos the package is
yum install -y xz-devel
For OSX with Homebrew.
brew install xz
The formula is xz which because lzma formula is deprecated, since it became a part of xz.
And finally on RedHat (I tested it on RHEL 7.4)
yum install -y xz-devel
When I try to install grequests on Ubuntu with pip:
sudo pip install grequests
I get this error, but my gcc seems fine:
In file included from gevent/core.c:253:0:
gevent/libevent.h:9:19: fatal error: event.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
You need to install libevent, which on Ubuntu can be done with:
apt-get install libevent-dev
Alternatively, to install gevent and all it's dependencies automatically:
apt-get install python-gevent
sudo apt-get install libevent-dev
grequests depends on the Python module gevent, and pip will pull that in for you automatically.
gevent depends on the C library libevent, and there's no way pip can take care of that for you. So, you need to install it manually, e.g., using your distro's package manager.
(Alternatively, gevent 1.0 and later no longer rely on libevent, or any other external dependencies. But, as of 25 Sep 2013, 1.0 isn't out yet…)
I also get the same error. Following commands helped me:
$ sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev python3-dev
Now try to install grequests again by following command:
Python 2
$ pip install grequests
Python 3.x
$ pip3 install grequests
If these commands doesn't help, then you can use the following commands:
Python 2
$ sudo apt install python-pip
$ pip install wheel
Python 3.x
$ sudo apt install python3-pip
$ pip3 install wheel
OR
$ sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
Now retry to install grequests. Hope the installation will work properly now.