How to solve OSError: decoder jpeg not available on centos 7 - django

I'm facing OSError on centos 7.
OSError: decoder jpeg not available
I tried many solutions for this but still facing same. How to solve this?

I have faced this problem with Python/Django in Ubuntu amazon server.
The solution was to recompile Pillow library after installing the following packagers:
libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
Probably the package names are different in CentOS, but you can search in yum to get the right names.
That's important to notice that you must uninstall and reinstall Pillow, PIL or any library that depends on these packages.

RĂ´mulo is correct; on CentOS 7, you're going to want to install a few pre-requisites. I also recommend installing EPEL (correct at time of writing):
# EPEL
echo 'Enabling Extra Packages for Enterprise Linux (EPEL) repository...'
yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
# Install additional packages
yum install zlib-devel libjpeg-turbo-devel libpng giflib
Then give it a try again.

Related

eal_memory.c:56:18: fatal error: numa.h: No such file or directory

When I execute make from the quick start instruction for DPDK, I get the following error:
eal_memory.c:56:18: fatal error: numa.h: No such file or directory
The error comes out even when libnuma is installed already:
>sudo yum install numactl-libs.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* elrepo: mirrors.tuna.tsinghua.edu.cn
Package numactl-libs-2.0.9-6.el7_2.x86_64 already installed and latest version
Nothing to do
I'm using CenOS Linux release 7.3.1611 (Core).
How do I fix this problem?
Try to install numactl-devel:
sudo yum install numactl-devel
numa.h is also part of libnuma package.
Please install libnuma package:
CentOS 6.9: yum install libnuma-devel
Ubuntu: apt-get install libnuma-dev
Looks like on CentOS 7 docker container libnuma-devel is not available. In that case try yum install numactl-devel

pip installation error for tensorflow

I was trying to install tensorflow from source on ubuntu 14.04, python 2.7.
I followed the steps from "tensorflow.org" for source installation.
I had completed all the steps, such as bazel installation, python dependencies installation.
In the final step for sudo pip installation; the command was as follows:-
$sudo pip install /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
but i am getting error as follows:
Unpacking /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
Downloading/unpacking tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cleaning up...
No distributions at all found for tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Storing debug log for failure in /home/ubuntu/.pip/pip.log
i also checked tensorflow_pkg wheel :but the above package was not available there.
so can a different .whl can be insatlled using pip such as -tensorflow-1.2.1-cp27-none-linux_x86_64.whl
which have downloaded in my desktop.
Please tell me how i can resolve this issue.
Thanks and regards
I didn't figure out the root of the problem, but for what its worth I skipped the tensorboard issue by installing an older version (1.2.0 worked for me)
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.0-cp27-none-linux_x86_64.whl
Try:
pip install tensorflow
If that doesn't work:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.1-cp27-none-linux_x86_64.whl
More info here and Common problems here.
My issue was resolved by following steps.
I updated the pip using
Also exported proxy settings.
e.g export https_proxy=...
This was able to resolve my issue.
I also tried installing other .whl file for tensorflow and yes tensorflow can be installed using the downloaded .whl file also.
Thank you

trouble installing biopython

I'm following the directions from the Biopython website (http://biopython.org/wiki/Download) but I keep getting an error during installation. I have python 2.7 installed on my laptop.
python2.7 -m pip install biopython
I just get the error:
No module named pip
I looked up this error and tried something stack overflow suggested:
sudo apt-get install python-pip
But I just got another error:
sudo: apt-get: command not found
As long as you have Python 2.7.9 onwards this should automatically install pip for you:
python -m ensurepip
It would be useful to know what Operating System you have to help improve the instructions here.
Many dependency issues are solved here at Annaconda where you fetch python, lots of nice libs, etc.. Install it accordingly to your platform.. windows, Linux or Mac OS.
Biopython is installed by Annaconda by default (including matplotlib and other dependencies)... if I recall correctly. Otherwise its from commandline conda search biopython and or conda install pip. And then commandline pip install biopython.

Missing libpq header files on CentOS when attempting to install psycopg2 module

I have been searching the web hours on end for several days and I am unable to install psycopg2 library on my Linux machine (CentOS - 2.6.32-431.3.1.el6.x86_64 GNU/Linux).
I know that the problem is that I am missing the libpq header files since I am getting this message after attempting pip install psycopg2: libpq-fe.h: No such file or directory
http://initd.org/psycopg/docs/install.html#install-from-source
Almost all the articles I found pointed me to use apt-get on CentOS but apt-get is not a standard tool on CentOS 6.3 so I've been trying yum install instead.
However, every time I try to use sudo yum install to download something the package is not available. For example:
yum install postgresql-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
drivesrvr | 2.2 kB 00:00
No package postgresql-devel available.
Error: Nothing to do
I've tried this for:
yum install postgresql-server
yum install python-devel
service postgresql initdb
service postgresql start
yum install python-psycopg2
Any ideas? Without the the libpq header files I can't install the psycopg2 module that is necessary for my Python program. This is for Python 2.7.12. And PostgreSQL 9.3.13.
I had this exact issue on Fedora 2016.09 box on Amazon. I was able to install postgresql-devel via yum, but that didn't do the trick; the version seemed to be out of date.
I solved it using:
sudo yum install /usr/include/libpq-fe.h
This installs an updated version of postgresql-devel which allows psycopg2 to compile correctly when installing through pip.

IOError decoder zip not available

I'm trying to get up and running with sorl thumbnail but I'm getting an error "decoder zip not available".
I have read through a ton of similar pages saying that it is a PIL / Pilow issue.
I have tried re-installing pil via:
easy_install http://dist.plone.org/thirdparty/PIL-1.1.7.tar.gz
As well as:
pip uninstall PIL Pillow
pip install Pillow
pip install PIL
I read that Ubuntu uses a directory called /lib/x86_64-linux-gnu for x64 architectures. If you are using that architecture you need to create a symbolic link for that as well as for other shared libraries.
$ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/libz.so
Additional info:
OS: Ubuntu Precice
I have not tried installing the package zlib from source which some others have also mentioned worked for them.
I found two solutions for this that worked for me.
The first way that worked for me was to use a different imaging library all together. I installed pgmagic and that worked fine.
sudo apt-get install libgraphicsmagick++-dev
sudo apt-get install libboost-python1.40-dev
There is also other imaging libraries available and they are all listed in the sorl-thumbnail docs:
http://sorl-thumbnail.readthedocs.org/en/latest/requirements.html
The second way that worked for me (preferred) was literally a fresh install of everything where I removed both pillow and PIL and the re-installed them starting with pillow.
pip uninstall pillow
pip uninstall PIL
pip install pillow
pip install PIL