Raspberry pi pip installation - python

I am trying to install apriltag in my Raspberry Pi 3 with Raspbian Jessie OS using the command -> pip install apriltag. It is returning an error:
Command "/home/pi/.virtualenvs/cv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-4ic0awdt/apriltag/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-4a_4lmt1/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.virtualenvs/cv/include/site/python3.4/apriltag"
failed with error code 1 in /tmp/pip-install-4ic0awdt/apriltag/
How can I solve this?

Try to upgrade pip.
sudo apt-get install python-pip
If that does not work reinstall pip.
sudo apt-get remove python-pip && sudo apt-get install python-pip

Related

Unable to install igraph on python 3.7

I need to install python-igraph into python 3.7 through pip3.
When I run: pip3 install python-igraph, I get this message error:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-whiv93xm/python-igraph/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-kbqa7cno-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-whiv93xm/python-igraph/
For information, i had it on python 2.7.
Thank you.
You might need to install some dependencies before installing the library.
Try this:
sudo apt install libxml2-dev libz-dev python-dev python3-dev build-essential
Then proceed with:
sudo pip3 install python-igraph
I hope this works

Downloading dlib on Raspberry Pi, pip keeps outputting error when I try?

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dhth2xud/dlib/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-7p82qhms-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-dhth2xud/dlib/
This is the error I keep getting, when simply running sudo pip3 install dlib.
I ran into the same error. Turns out you need to install those prerequisits on the Raspberry Pi:
sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev
I read that it helps to free up RAM by disabling GUI start (sudo raspi-config and under Boot options change from GUI to Console) but that alone didn't help.
I then followed the Ubuntu installation instructions here (the 3 commands above) and then sudo pip3 install dlib stopped showing this error and started installation.

Install error for PIL/PILLOW in Pycharm

I have tried to install both the PIL and PILLOW packages in pycharm but I'm getting some errors when I try from the terminal as suggested. How can I resolve them?
Error:
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
followed by:
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-v9j6b44w/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-im6_90gt-record/install-record.txt --single-version-externally-managed --compile --user" failed with error code 1 in /tmp/pip-build-v9j6b44w/Pillow
You need to install python development tools first
Python 2:
sudo apt-get install python-dev python-setuptools
Python 3:
sudo apt-get install python3-dev python3-setuptools
See other requirements in this SO answer

Error in installing Scrapy in Ubuntu Fresh Install

I am trying to install scrapy module in Ubuntu (running in Virtualbox on a Windows Machine).
When I do pip install scrapy, I get the following error at the end of the install:
Command /usr/bin/python -c "import setuptools, tokenise;
__file__='/tmp/pip-build-csKz7u/Twisted/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-FIY6qO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-csKz7u/Twisted
Storing debug log for failure in /root/.pip/pip.log
What am I missing or doing wrong here?
Ubuntu doesn't come with the python header and library by default it's in python-dev. Run the following to install before installing scrapy.
sudo apt-get update; sudo apt-get install python-dev -y

Cannot install pycrypto inside virtualenv on ubuntu 12.04

I tried pip install pycrypto using the virtualenv pip.
When I'm using sudo the installation succeeds, but not inside the virtual environment which does not help me.
The sudo apt-get install python-dev solution didn't help either. And also using easy_install and yum didn't help.
This is the bottom line of the error i get when I'm trying to install:
Command /home/ubuntu/conceep-env/bin/python -c "import setuptools,tokenize;__file__='/home/ubuntu/conceep-env/build/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/tmp/pip-NaKMgy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/conceep-env/include/site/python2.7 failed with error code 1 in /home/ubuntu/conceep-env/build/pycrypto
Storing debug log for failure in /var/tmp/tmp3k2sTZ
Just fixed it using sudo path/to/my/virtenv/bin/pip install pycrypto.

Categories