Failed building wheel for scrypt - python ethereum (pyethapp) - python

My compilation terminated 2 times when installing pyethapp on Ubuntu.
Firstly, I installed packages:
apt-get install build-essential automake pkg-config libtool libffi-dev libgmp-dev
I made virtualenv and tried to install pyethapp inside venv with pip:
pip install mytheapp
but it crashed with 2 following errors:
1.)
#include <openssl/aes.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for scrypt
2.)
scrypt-1.2.0/libcperciva/crypto/crypto_aes.c:6:25: fatal error: openssl/aes.h: No such file or directory
#include <openssl/aes.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/iceing/.virtualenvs/pyethapp/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3PNrgn/scrypt/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-SSJvgT-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/iceing/.virtualenvs/pyethapp/include/site/python2.7/scrypt" failed with error code 1 in /tmp/pip-build-3PNrgn/scrypt/

This one worked for me:
sudo apt-get install libssl-dev

It seems you need OpenSSL:
apt-get install openssl

First try installing
sudo apt-get install openssl
However, If it still dont work then try installing
sudo apt-get install libssl-dev
By now it should work fine.

Related

Ubuntu16 cannot install pyheif

I'm trying to install pyheif to use heic files on Linux server.
pyheif: https://pypi.org/project/pyheif/
Linux library command:
sudo apt-get install python3 python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python3-pip
sudo apt-get install libpcap-dev libpq-dev
apt install libffi6 libheif-dev libde265-dev <-- I cannot find libffi. only libffi6 is available.
Now then I try to install pyheif
pip3 install pyheif
TRACEBACK:
...long lines ...
build/temp.linux-x86_64-3.6/_libheif_cffi.c: In function ‘_cffi_d_heif_context_read_from_memory_without_copy’:
build/temp.linux-x86_64-3.6/_libheif_cffi.c:2375:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
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-pfesa6xd/pyheif/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-me_rlsh8-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-pfesa6xd/pyheif/
How can I install pyheif?
How can I solve that tracebacks.
https://github.com/carsales/pyheif/issues/44
We can install from wheel anyway. The problem why wheel was not used was matching the tags (manylinux), in particular pip was missing the cp36-cp36m-manylinux2014_x86_64 (had only cp36-cp36m-manylinux2010_x86_64). This was due to an older version of pip (19.2), rather than 19.3.
pip install -U pip
pip install pyheif

How to install cryptography on ubuntu 18.04 bionic?

I keep getting gcc errors when trying to install the python library cryptography.
The main error is:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Note I'm using docker with ubuntu:bionic, and installing the following items:
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
python3 \
python3-pip \
python3-dev \
git \
libffi-dev \
libssl-dev
Here's a longer log output:
At top level:
build/temp.linux-x86_64-3.6/_openssl.c:3555:13: warning: '_ssl_thread_locking_function' defined but not used [-Wunused-function]
static void _ssl_thread_locking_function(int mode, int n, const char *file,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Can't rollback cryptography, nothing uninstalled.
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6z_lweq8/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-3303ra3b-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6z_lweq8/cryptography/
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1
Thank you to #pobe's comment in How to install cryptography on ubuntu? , I realized that I needed to install libssl1.0 instead! Posted as a separate question because it took a really long time to find that answer.

How to Resolve 'Error while installing steem-python'

I have a VM with Ubuntu 18.04.1.
python3 --version says 3.6.5.
I installed pip without any failure (seems like).
Then I tried to install steem-python with
pip install steem
but I get a failure, which looks like:
bla bla bla
...
^~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for scrypt
Running setup.py clean for scrypt
...
^~~~~~~~~~~~~~~
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-0iqf8q/scrypt/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-1dMD0Y-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-0iqf8q/scrypt/
Now I'm out of ideas. Can anybody help me to fix this? How can I install it?
My goal is to interact with the steem blockchain.
You will need to install python3-dev on ubuntu (in addition to unixodbc-dev) and it did work.
Please ensure you've installed these:
$ sudo apt-get install python3-dev
$ sudo apt-get install unixodbc-dev
FYI : Python 2.x users, will need python-dev instead.

Pillow instillation field with python3.2 django1.8

I'm working with a django project and now I want to add an image field, django asked me to install Pillow with the command "pip install Pillow",
thie problem is when I run this command, and this one also "sudo install Pillow" I get the message:
gcc: error: build/temp.linux-x86_64-3.2/libImaging/BoxBlur.o: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-otvko5/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5430vf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-otvko5/Pillow
I have tried all the ways that I found on the internet as well as the other ways to install Pillow such as easy_install, but each time I get a new problem.
Try to run the below commands in your linux
sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install libevent-dev
Try this:
sudo apt-get install python-pil

Installing Python 3 Docker Ubuntu error command 'x86_64-linux-gnu-gcc

I'm trying to create a dockerfile that uses Python 3.
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y python3 python3-dev python-pip
RUN apt-get install -y libxml2-dev libxslt1-dev libpq-dev libjpeg-dev libfreetype6-dev zlib1g-dev
RUN cd /var/projects/apps && pip install -r requirements.txt
I get the error fatal error: Python.h: No such file or directory when trying to install pillow in my requirements, why and I'm I installing python 3 correctly?
error:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-C7CMih-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pillow
Storing debug log for failure in /root/.pip/pip.log
INFO[0102] The command [/bin/sh -c cd /var/projects/app && pip install -r requirements.txt] returned a non-zero code: 1
You should install python3-pip in your Dockerfile and then run pip3 install -r requirements.txt

Categories

Resources