I am trying to install ReviewBoard on 14.04.1-Ubuntu and I get the error below. I have used commands:
sudo apt-get install python-setuptools python-dev memcached patch libjpeg-dev
sudo pip install -U pip
sudo easy_install pip
sudo apt-get install python-mysqldb
sudo pip install ReviewBoard
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run self.build_extensions()
File "/tmp/pip-build-84i3OO/Pillow/setup.py", line 512, in build_extensions' using --disable-%s, aborting' % (f, f))
ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-84i3OO/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5lU4Yb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-84i3OO/Pillow/
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages
/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Are there any ideas why does it happen and how to solve it?
EDIT
Installed pillow (https://discuss.erpnext.com/t/new-python-dependency-pillow-if-you-get-error-during-update-see-this-post/7900):
sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo pip install pillow
Now getting:
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 - Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/l ibffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2 .7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python -u -c
"import setuptools, tokenize;__file__='/tmp/pip-build-hB90D2/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CCyW5e-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-hB90D2/cffi/
Have you tried to install libffi-devel
apt-get install libffi-dev
Sometime to fix pip issues its useful to install build-essential and python-dev
apt-get install python-dev && apt-get install build-essential
Good luck!
Installed pillow using (https://discuss.erpnext.com/t/new-python-dependency-pillow-if-you-get-error-during-update-see-this-post/7900):
sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo pip install pillow
Then ccfi using (Failed to install Python Cryptography package with PIP and setup.py):
sudo apt-get install libffi-dev libssl-dev libpython2.7-dev
sudo pip install cryptography
sudo pip install cffi
To get Python 2.7 Fabric 1.13 on CentOS 7 working I had to install openssl-devel first.
Complete Error:
#include <openssl/opensslv.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2hTQUe/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mqFBbh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2hTQUe/cryptography/
Solution:
sudo yum install -y gcc make openssl openssl-devel
sudo pip install fabric
Related
I'm trying to install Superset on CentOS 7, I've followed the official site
Apache Superset
and I've installed all required dependencies:
sudo yum upgrade python-setuptools
Plugin abilitati:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.inode.at
* centosplus: mirror.inode.at
* epel: mirror.inode.at
* extras: mirror.nextlayer.at
No packages marked for update
The gcc-4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The gcc-c ++ - 4.8.5-39.el7.x86_64 package is already installed and updated to the latest version
The libffi-devel-3.0.13-18.el7.x86_64 package is already installed and updated to the latest version
The python-devel-2.7.5-86.el7.x86_64 package is already installed and updated to the latest version
The python2-pip-8.1.2-12.el7.noarch package is already installed and updated to the latest version
The python2-wheel-0.29.0-2.el7.noarch package is already installed and updated to the latest version
Package 1: openssl-devel-1.0.2k-19.el7.x86_64 is already installed and updated to the latest version
The cyrus-sasl-devel-2.1.26-23.el7.x86_64 package is already installed and updated to the latest version
The openldap-devel-2.4.44-21.el7_6.x86_64 package is already installed and updated to the latest version
But I've this error when execute
pip install apache-superset
for python-geohash
ERROR: Command errored out with exit status 1:
command: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash
cwd: /tmp/pip-install-6xsufws2/python-geohash/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying geohash.py -> build/lib.linux-x86_64-3.6
copying quadtree.py -> build/lib.linux-x86_64-3.6
copying jpgrid.py -> build/lib.linux-x86_64-3.6
copying jpiarea.py -> build/lib.linux-x86_64-3.6
running build_ext
building '_geohash' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -stdlib=libc++ -fPIC -DPYTHON_MODULE=1 -I/home/mik/supersetvenv/include -I/usr/include/python3.6m -c src/geohash.cpp -o build/temp.linux-x86_64-3.6/src/geohash.o
gcc: error: unrecognized command line option ‘-stdlib=libc++’
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/mik/supersetvenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6xsufws2/python-geohash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rvrvxjco/install-record.txt --single-version-externally-managed --compile --install-headers /home/mik/supersetvenv/include/site/python3.6/python-geohash Check the logs for full command output.
Can someone help me?
I find the solution:
I remove packages gcc gcc-c++ libffi-devel python-devel and I reinstall them
sudo yum erase gcc gcc-c++ libffi-devel python-devel
sudo yum install gcc gcc-c++ libffi-devel python-devel
Because in /usr/include/python3.6m I didn't have file *.h to include in the compilation.
In addition to Mik's answer: The python-devel is now called python36-devel. Use this to check the correct name if someone had the problem about "can't find python-devel".
# check the name of python.devel
> sudo yum search python3 | grep devel
# install the python36.devel
> sudo yum install python36.devel
Try these steps..
sudo yum -y upgrade python-setuptools
pip install --upgrade setuptools pip
pip install --upgrade pip
pip3 install --upgrade pip
# hash -r
pip install virtualenv
python3 -m venv venv
. venv/bin/activate
pip install --upgrade setuptools pip
pause 'Pause - press Enter to continue'
# Install superset
pip install superset
pip uninstall --yes pandas
pip install pandas==0.23.4
pip install sqlalchemy==1.2.18
pip install flask==1.0.0
# Initialize the database
superset db upgrade
The project was working perfectly until recently when I created a model for my database and tried to pip install requirement.txt. I have done everything I know including modifying my settings.py to add the missing library, reinstalling django and psycopg2, all to no avail. Here's my requirement.txt:
tweepy==3.8.0
django
gunicorn
django-heroku
The error i'm getting:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/apple/Downloads/font_text/python-getting-started/getting-started/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-install-phi9wroh/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-record-sc3y24vo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/apple/###/###/PROJECTFOLDER/getting-started/include/site/python3.7/psycopg2" failed with error code 1 in /private/var/folders/tn/843ff_ns4j5ddf0fyc998v6c0000gn/T/pip-install-phi9wroh/psycopg2/
Based on the error message, you need to install the openssl-devel package on your system.
After long hours of searching and experimenting, I finally was able to solve the problem. But I'm still investigating on what really could have caused the error. Anyways, here's what fixed it
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
pip install psycopg2
I found it here: error installing psycopg2, library not found for -lssl
You need to reinstall gcc , gcc-c++ and dependencies.
For python 2.7
$ sudo yum -y install gcc gcc-c++ kernel-devel
$ sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel
$ pip install "your python packet"
For python 3.4
$ sudo apt-get install python3-dev
$ pip install "your python packet"
Hope this will help.
I downloaded the Virtual Machine (for Android/Buildozer) from here.
I need to install Matplotlib on this virtual machine, but I am not able to.
I already tried the following in the terminal:
sudo pip install matplotlib
sudo apt-get build-dep python-matplotlib
python -mpip install matplotlib
I get the following error:
posixsybprocess.c:16:20: fatal error: Python.h: No such file or directory
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-5xFopz/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Q8TTao/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-5xFopz/subprocess32/
Can anyone help me with that?
try this:
sudo apt-get install libfreetype6-dev libpng-dev
then
sudo apt-get install python-pip
sudo pip install matplotlib
if it's not working:
sudo apt-get install python-matplotlib
or just
sudo apt-get install matplotlib
If it's not working at first try to upgrade and update the apt-get, then try one more time
I have trouble installing modules using pip, for example
sudo -H pip3 install kivy
returns this error
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-b3rwh_e6/kivy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bev6v2mx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-b3rwh_e6/kivy/
I am fairly new to python and to programming in general so I'm probably doing something wrong, it's probably worth mentioning that I have python2.7 and python3.5 installed, and installing the packages python3.5-dev and build-essential didn't fix it.
Edit: build log:
https://drive.google.com/file/d/0B5e3GD1lfCbUZ19LU3RENzY4MU0/view?usp=sharing
Packages which include C extensions require compilation and so might require both gcc and python-dev (and in some cases gcc-c++).
run:
sudo apt-get install gcc python-dev
prior to pip installing your package.
Have you tried to install
sudo apt-get install python-dev
for python2.7 ?
From the official site
https://kivy.org/docs/installation/installation-linux.html
for python 2
sudo apt-get install python-kivy
for python 3
sudo apt-get install python3-kivy
When I Run Command pypy -m pip install cryptography
then I have got below Errors:
cc -arch x86_64 -O2 -fPIC -Wimplicit -I/opt/pypy-5.0.1/include -c build/temp.macosx-10.10-x86_64-2.7/_openssl.c -o build/temp.macosx-10.10-x86_64-2.7/build/temp.macosx-10.10-x86_64-2.7/_openssl.o
build/temp.macosx-10.10-x86_64-2.7/_openssl.c:423:10: fatal error: 'openssl/e_os2.h' file not found
#include
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/pypy -u -c "import setuptools, tokenize;file='/private/var/folders/_t/8l_tq9210xl4bzlhkspnv8br0000gn/T/pip-build-Gjhf5l/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/_t/8l_tq9210xl4bzlhkspnv8br0000gn/T/pip-6_y8I9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_t/8l_tq9210xl4bzlhkspnv8br0000gn/T/pip-build-Gjhf5l/cryptography/
On OS X PyPy you'll need to brew install openssl (or port install or whatever) and then run the following command:
LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
If you use ports modify the paths to point at the proper location.
if you pc is mac,please configure as follows:
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
and amazingly,it works fine for me.
Cryptography requires compiling C Extensions.
Depending on the the platform you're on, you should install python-dev and gcc prior to installing cryptography:
debian: sudo apt-get install python-dev gcc
rhel: sudo yum install python-devel gcc
windows: you need to install the Python C++ Runtime (https://www.microsoft.com/en-us/download/details.aspx?id=44266)