issues with: pip install fiona - python-2.7

I have some issues to install fiona on ubuntu 14.04
I always get the error
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-b4ng2wm0/fiona/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-uj6y8dyt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-b4ng2wm0/fiona/
I already tried: sudo -H pip install fiona as well as sudo pip install -U setuptools, python -m pip install fiona, sudo apt-get install python-software-properties, sudo add-apt-repository ppa:ubuntugis/ppa
Any other idea what could be tried out?
Many thanks in advance.

Related

Error whie install psycopg2 on ubuntu server 16.04

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------- ERROR: Command errored out with exit status 1: /home/mosi/venv/bin/python3.6 -u -c 'import
sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-im9_x6c8/psycopg2/setup.py'"'"';
file='"'"'/tmp/pip-install-im9_x6c8/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 /tmp/pip-record-jyz3lis6/install-record.txt
--single-version-externally-managed --compile --install-headers /home/mosi/venv/include/site/python3.6/psycopg2 Check the logs for
full command output.
I had similar problems with psycopg2 some time too. Resolved it just by replacing psycopg2 with appropriate version of psycopg2-binary.
It may occur due to missing Postgres and/or Python libraries. Make sure you have essentials:
$ sudo apt-get install libpq-dev
$ sudo apt-get install python-dev

Installing scrapy in Lubuntu using pip install scrapy (or sudo ) and getting the following error

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nExfhn/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-dpob_w-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nExfhn/cryptography/
So I have tried :
1) pip install scrapy (with pip 9.0.1 so no need to update)
2) sudo pip install scrapy (still getting the same error)
I have setup the scrapy framework in Windows environment but in Linux seems different and I also get this Cryptography error.

Python - pip install markupsafe

So i want to install markupsafe and get this following error:
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\appdata\\local\\temp\\pip-build-yb_vy0\\markupsafe\\setup.py';ex
ec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'
), __file__, 'exec'))" install --record c:\users\appdata\local\temp\pip-h
xgnlp-record\install-record.txt --single-version-externally-managed --compile" f
ailed with error code 1 in c:\users\appdata\local\temp\pip-build-yb_vy0\m
arkupsafe\
anyone got an idea how to fix it?
you need install Microsoft Visual C++ Compiler for Python 2.7 if you are using windows else sudo apt-get install gcc gcc-c++ if is not OS windows

Sentry compile fails with " error: command 'gcc' failed with exit status 1"

Been trying to install Sentry on CentOS 6.5. I have installed the prerequisites i.e Python 2.7.9
[root#localhost poduori]# python -V
Python 2.7.9
I used pyenv to change from the pre-installed python version 2.6.6 (pyenv install 2.7.9). When I try to install sentry I get the below output and error;
NB: I had already run it once hence it using cached.
pip2.7 install sentry
The full error output can be found here https://www.dropbox.com/s/64w6b7dswgzs9cb/Sentry_error.txt?dl=0
or
Sentry error txt file
A summary of the error I'm getting is below
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/.pyenv/versions/2.7.9/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-PSGsNT/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-UYMAyw-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-PSGsNT/cffi
The output was too long to post here so I used dropbox instead.
libffi is already installed.
root#localhost user]# rpm -qa|grep libffi
libffi-3.0.5-3.2.el6.x86_64
I already installed all the development tools,
yum groupinstall "Development tools" (including gcc compiler) but I still get the same error. Kindly assist.
ERROR: /bin/sh: xslt-config: command not found
** make sure the development packages of libxml2 and libxslt are installed **
c/_cffi_backend.c:13:17: error: ffi.h: No such file or directory
You need to install dev packages first one (it let you out of this w/ pre-built libs) is libxslt-dev, second one is python-dev. Exact names depends on your distro.
Using ubuntu i solved this by:
Installing setuptools with :
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
created a file requisits.sh
inserted the content:
#! /bin/bash
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt-get install setuptools
sudo apt-get install python-pip
sudo apt-get install libxslt1-dev
sudo apt-get install libxslt-dev
sudo apt-get install libxml2-dev
sudo apt-get install libz-dev
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev
put execution chmod +x requisits.sh
executed:
./requisits.sh
entered the password and answered y/n when prompted.
and finally :
if using virtualenv:
pip install -U sentry
else
sudo pip install -U sentry

pip install python-novaclient is failing due to netifaces.c

I'm trying to install OpenStack python novaclient using pip install python-novaclient
This task fails: netifaces.c:185:6 #error You need to add code for your platform
I have no idea what code it wants.
Does anyone understand this?
I also had this problem, and resolved by
sudo yum install python-devel python-pip
sudo yum -y install gcc
Same issue in awx_task container in AWX project (Centos 7), trying to execute
pip install python-openstackclient
Error was:
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-LTchWP/netifaces/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-86uBIZ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-LTchWP/netifaces/
Solved with:
yum install python-devel python-pip gcc
Hope it will help someone!
This has to do with the order that libraries are imported in the netifaces setup.py and is fixed in version 10.3+ (which you need to install from source). Here's how to install 10.4 (current latest release):
mkdir -p /tmp/install/netifaces/
cd /tmp/install/netifaces && wget -O "netifaces-0.10.4.tar.gz" "https://pypi.python.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz#md5=36da76e2cfadd24cc7510c2c0012eb1e"
tar xvzf netifaces-0.10.4.tar.gz
cd netifaces-0.10.4 && python setup.py install
I landed on this question while doing something similar:
pip install rackspace-novaclient
And this is what my error looked like:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-G5GwYu/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Jugr2a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-G5GwYu/netifaces
After reading the entire output logs, I realized I was missing "gcc" and just needed to install it.
On CentOS 7, my fix was:
yum -y install gcc && pip install rackspace-novaclient