Heroku can't find libssh2.h - python

I'm trying to deploy a basic Flask application to Heroku.
I've done one before which worked, but now that I've added SSH it won't deploy.
This is my requirements.txt:
Flask==0.12.2
Gunicorn==19.7.1
parallel-ssh==1.2.0
The heroku build log is:
-----> Python app detected
-----> Installing requirements with pip
Collecting parallel-ssh==1.2.0 (from -r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading parallel_ssh-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (1.6MB)
Collecting ssh2-python>=0.6.0 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading ssh2-python-0.7.0.post2.tar.gz (438kB)
Collecting paramiko<2.2 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading paramiko-2.1.4-py2.py3-none-any.whl (173kB)
Collecting gevent>=1.1 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading gevent-1.2.2-cp36-cp36m-manylinux1_x86_64.whl (1.7MB)
Collecting pyasn1>=0.1.7 (from paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)
Collecting cryptography>=1.1 (from paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
Collecting greenlet>=0.4.10 (from gevent>=1.1->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading greenlet-0.4.12-cp36-cp36m-manylinux1_x86_64.whl (42kB)
Collecting six>=1.4.1 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
Collecting idna>=2.1 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl (419kB)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading pycparser-2.18.tar.gz (245kB)
Installing collected packages: ssh2-python, pyasn1, six, asn1crypto, idna, pycparser, cffi, cryptography, paramiko, greenlet, gevent, parallel-ssh
Running setup.py install for ssh2-python: started
Running setup.py install for ssh2-python: finished with status 'error'
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xqi26x3e/ssh2-python/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-yn7ewtm4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ssh2
copying ssh2/_version.py -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/__init__.py -> build/lib.linux-x86_64-3.6/ssh2
running egg_info
writing ssh2_python.egg-info/PKG-INFO
writing dependency_links to ssh2_python.egg-info/dependency_links.txt
writing top-level names to ssh2_python.egg-info/top_level.txt
reading manifest file 'ssh2_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ssh2_python.egg-info/SOURCES.txt'
copying ssh2/agent.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/channel.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/error_codes.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/exceptions.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/fileinfo.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/listener.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/pkey.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/publickey.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/session.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/sftp.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/sftp_handle.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/statinfo.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/utils.c -> build/lib.linux-x86_64-3.6/ssh2
running build_ext
building 'ssh2.pkey' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/ssh2
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ilibssh2/include -I/app/.heroku/python/include/python3.6m -c ssh2/pkey.c -o build/temp.linux-x86_64-3.6/ssh2/pkey.o -O3
ssh2/pkey.c:527:21: fatal error: libssh2.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xqi26x3e/ssh2-python/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-yn7ewtm4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xqi26x3e/ssh2-python/
! Push rejected, failed to compile Python app.
! Push failed
It seems to install a lot of other dependencies, which is fine. But it somehow fails to find libssh2.h.
What can I do about that?

Related

How to run Faust from Docker - ERROR: Failed building wheel for python-rocksdb

I'm trying to run Python Faust from Docker.
Based on this documentation: https://faust.readthedocs.io/en/latest/userguide/installation.html
I created a simple Docker file:
FROM python:3
ADD ./app/app.py /
RUN pip3 install --upgrade pip
RUN pip install -U faust
RUN pip install "faust[rocksdb]"
RUN pip install "faust[rocksdb,uvloop,fast,redis]"
CMD ["python", "./app.py"]
When I create a docker file I receive an error at the 5th stage (Step 5/7 : RUN pip install "faust[rocksdb]")
---> Running in 1e42a5e50cbe Requirement already satisfied:
faust[rocksdb] in /usr/local/lib/python3.10/site-packages (1.10.4)
Requirement already satisfied: terminaltables<4.0,>=3.1 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (3.1.10)
Requirement already satisfied: click<8.0,>=6.7 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (7.1.2)
Requirement already satisfied: yarl<2.0,>=1.0 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.7.2)
Requirement already satisfied: aiohttp-cors<2.0,>=0.7 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (0.7.0)
Requirement already satisfied: mypy-extensions in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (0.4.3)
Requirement already satisfied: colorclass<3.0,>=2.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (2.2.2)
Requirement already satisfied: opentracing<2.0.0,>=1.3.0 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.3.0)
Requirement already satisfied: mode<4.4,>=4.3.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (4.3.2)
Requirement already satisfied: venusian<2.0,>=1.1 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.2.0)
Requirement already satisfied: aiohttp<4.0,>=3.5.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (3.8.1)
Requirement already satisfied: robinhood-aiokafka<1.2,>=1.1.6 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.1.6)
Requirement already satisfied: croniter>=0.3.16 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.1.0)
Collecting python-rocksdb>=0.6.7 Downloading
python-rocksdb-0.7.0.tar.gz (219 kB) Preparing metadata (setup.py):
started Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: aiosignal>=1.1.2 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (1.2.0) Requirement already
satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/site-packages
(from aiohttp<4.0,>=3.5.2->faust[rocksdb]) (21.2.0) Requirement
already satisfied: frozenlist>=1.1.1 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (1.2.0) Requirement already
satisfied: charset-normalizer<3.0,>=2.0 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (2.0.9) Requirement already
satisfied: multidict<7.0,>=4.5 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (5.2.0) Requirement already
satisfied: async-timeout<5.0,>=4.0.0a3 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (4.0.2) Requirement already
satisfied: python-dateutil in /usr/local/lib/python3.10/site-packages
(from croniter>=0.3.16->faust[rocksdb]) (2.8.2) Requirement already
satisfied: colorlog>=2.9.0 in /usr/local/lib/python3.10/site-packages
(from mode<4.4,>=4.3.2->faust[rocksdb]) (6.6.0) Requirement already
satisfied: setuptools>=25 in /usr/local/lib/python3.10/site-packages
(from python-rocksdb>=0.6.7->faust[rocksdb]) (57.5.0) Requirement
already satisfied: kafka-python<1.5,>=1.4.6 in
/usr/local/lib/python3.10/site-packages (from
robinhood-aiokafka<1.2,>=1.1.6->faust[rocksdb]) (1.4.7) Requirement
already satisfied: idna>=2.0 in
/usr/local/lib/python3.10/site-packages (from
yarl<2.0,>=1.0->faust[rocksdb]) (3.3) Requirement already satisfied:
six>=1.5 in /usr/local/lib/python3.10/site-packages (from
python-dateutil->croniter>=0.3.16->faust[rocksdb]) (1.16.0)
And an ERROR PART:
Building
wheels for collected packages: python-rocksdb Building wheel for
python-rocksdb (setup.py): started ERROR: Command errored out with
exit status 1: command: /usr/local/bin/python -u -c 'import io, os,
sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/setup.py'"'"';
file='"'"'/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
bdist_wheel -d /tmp/pip-wheel-9_o4ek6z
cwd: /tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/
Complete output (64 lines): running bdist_wheel running build
running build_py creating build creating
build/lib.linux-x86_64-3.10 creating
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/interfaces.py ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/errors.py ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/merge_operators.py -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/init.py -> build/lib.linux-x86_64-3.10/rocksdb
creating build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_memtable.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_db.py -> build/lib.linux-x86_64-3.10/rocksdb/tests
copying rocksdb/tests/init.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_options.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests running egg_info writing
python_rocksdb.egg-info/PKG-INFO writing dependency_links to
python_rocksdb.egg-info/dependency_links.txt writing requirements to
python_rocksdb.egg-info/requires.txt writing top-level names to
python_rocksdb.egg-info/top_level.txt reading manifest file
'python_rocksdb.egg-info/SOURCES.txt' reading manifest template
'MANIFEST.in' writing manifest file
'python_rocksdb.egg-info/SOURCES.txt' copying rocksdb/_rocksdb.cpp
-> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/rocksdb.pyx -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/backup.pxd -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/cache.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/comparator.pxd
-> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/db.pxd -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/env.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/filter_policy.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/iterator.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/logger.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/memtablerep.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/merge_operator.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/options.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/slice.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/slice_transform.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/snapshot.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/status.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/std_memory.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/table_factory.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/universal_compaction.pxd ->
build/lib.linux-x86_64-3.10/rocksdb creating
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/comparator_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/filter_policy_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/memtable_factories.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/merge_operator_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/slice_transform_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/utils.hpp -> build/lib.linux-x86_64-3.10/rocksdb/cpp
copying rocksdb/cpp/write_batch_iter_helper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp running build_ext
cythoning rocksdb/_rocksdb.pyx to rocksdb/_rocksdb.cpp
/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/.eggs/Cython-0.29.26-py3.10-linux-x86_64.egg/Cython/Compiler/Main.py:369:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later release! File:
/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/rocksdb/_rocksdb.pyx
tree = Parsing.p_module(s, pxd, full_module_name) building 'rocksdb._rocksdb' extension creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/rocksdb gcc -pthread
-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.10 -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.10/rocksdb/_rocksdb.o -std=c++11 -O3 -Wall
-Wextra -Wconversion -fno-strict-aliasing -fno-rtti rocksdb/_rocksdb.cpp:705:10: fatal error: rocksdb/slice.h: No such
file or directory
705 | #include "rocksdb/slice.h"
| ^~~~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1
---------------------------------------- Building wheel for python-rocksdb (setup.py): finished with status 'error' ERROR:
Failed building wheel for python-rocksdb
Can anyone help me to move on with this? I'd like to use Faust from Docker on Kubernetes.
Read the error message, where it is clearly stated you are missing a header file:
fatal error: rocksdb/slice.h: No such file or directory 705 | #include "rocksdb/slice.h" | ^~~~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1
Accordingly, you'll need to build and install RocksDB. This is separate from the installation of faust[rocksdb] with pip. That simply installs python-rocksdb, the Python interface to the underlying libraries.
There is even a (third-party) RocksDB docker image based on Python 3.7 Slim.
You could use that directly or take some tricks from the Dockerfile for that image.

Error while installing dependencies for a project [duplicate]

This question already has answers here:
Pip error: Microsoft Visual C++ 14.0 is required
(13 answers)
Closed 2 years ago.
(env) C:\Users\CSUFTitan\Desktop\Final_Starter\backend>pip3 install -r requirements.txt
Requirement already satisfied: aniso8601==6.0.0 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 1)) (6.0.0)
Requirement already satisfied: Click==7.0 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 2)) (7.0)
Requirement already satisfied: Flask==1.0.3 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 3)) (1.0.3)
Requirement already satisfied: Flask-Cors==3.0.7 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 4)) (3.0.7)
Requirement already satisfied: Flask-RESTful==0.3.7 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 5)) (0.3.7)
Requirement already satisfied: Flask-SQLAlchemy==2.4.0 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 6)) (2.4.0)
Requirement already satisfied: itsdangerous==1.1.0 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 7)) (1.1.0)
Requirement already satisfied: Jinja2==2.10.1 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 8)) (2.10.1)
Requirement already satisfied: MarkupSafe==1.1.1 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 9)) (1.1.1)
Collecting psycopg2-binary==2.8.2
Using cached psycopg2-binary-2.8.2.tar.gz (369 kB)
Requirement already satisfied: pytz==2019.1 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 11)) (2019.1)
Requirement already satisfied: six==1.12.0 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 12)) (1.12.0)
Requirement already satisfied: SQLAlchemy==1.3.4 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 13)) (1.3.4)
Requirement already satisfied: Werkzeug==0.15.4 in c:\users\csuftitan\desktop\final_starter\env\lib\site-packages (from -r requirements.txt (line 14)) (0.15.4)
Using legacy setup.py install for psycopg2-binary, since package 'wheel' is not installed.
Installing collected packages: psycopg2-binary
Attempting uninstall: psycopg2-binary
Found existing installation: psycopg2-binary 2.8.5
Uninstalling psycopg2-binary-2.8.5:
Successfully uninstalled psycopg2-binary-2.8.5
Running setup.py install for psycopg2-binary ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\csuftitan\desktop\final_starter\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CSUFTitan\\AppData\\Local\\Temp\\pip-install-1nbc6jyl\\psycopg2-binary\\setup.py'"'"'; __file__='"'"'C:\\Users\\CSUFTitan\\AppData\\Local\\Temp\\pip-install-1nbc6jyl\\psycopg2-binary\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CSUFTitan\AppData\Local\Temp\pip-record-k_sqf8bd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\csuftitan\desktop\final_starter\env\include\site\python3.8\psycopg2-binary'
cwd: C:\Users\CSUFTitan\AppData\Local\Temp\pip-install-1nbc6jyl\psycopg2-binary\
Complete output (22 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\psycopg2
copying lib\compat.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\errors.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\extras.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\pool.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\sql.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\tz.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\_ipaddress.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\_json.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\_lru_cache.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\_range.py -> build\lib.win-amd64-3.8\psycopg2
copying lib\__init__.py -> build\lib.win-amd64-3.8\psycopg2
running build_ext
building 'psycopg2._psycopg' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Rolling back uninstall of psycopg2-binary
Moving to c:\users\csuftitan\desktop\final_starter\env\lib\site-packages\psycopg2\
from C:\Users\CSUFTitan\Desktop\Final_Starter\env\Lib\site-packages\~sycopg2
Moving to c:\users\csuftitan\desktop\final_starter\env\lib\site-packages\psycopg2_binary-2.8.5.dist-info\
from C:\Users\CSUFTitan\Desktop\Final_Starter\env\Lib\site-packages\~sycopg2_binary-2.8.5.dist-info
ERROR: Command errored out with exit status 1: 'c:\users\csuftitan\desktop\final_starter\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CSUFTitan\\AppData\\Local\\Temp\\pip-install-1nbc6jyl\\psycopg2-binary\\setup.py'"'"'; __file__='"'"'C:\\Users\\CSUFTitan\\AppData\\Local\\Temp\\pip-install-1nbc6jyl\\psycopg2-binary\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CSUFTitan\AppData\Local\Temp\pip-record-k_sqf8bd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\csuftitan\desktop\final_starter\env\include\site\python3.8\psycopg2-binary'
Check the logs for full command output.
Instead of
pip install psycopg2
try to run
pip install psycopg2-binary
or
pip install psycopg2-binary --user
or
You can find a compiled version of psycopg2 here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
download binary file from this link and do easy_install.

Failed building wheel for typed-ast

I hope you are doing well.
My objective is to automate some tasks for Radarr from my Synology NAS by using the following scripts: https://github.com/linaspurinis/trakt.plex.scripts
(their job is to get some filtered lists of movies from trakt.tv, and add the movies found to Radarr automatically; e.g. they will look for the top 10 watched movies of the week, and add to Radarr the movies (among the 10) with a rating superior to 7 with a minimum of 100 votes).
I did the two first steps from the README.md and placed my scripts in /volume1/scripts/movies/trakt.plex.scripts-master on my NAS, but I get a python error when executing the third step (pip install -r requirements.txt) using SSH. Here is the full output:
superadmin#diskstation:/volume1/scripts/movies/trakt.plex.scripts-master$ sudo /volume1/#appstore/py3k/usr/local/bin/pip3 install -r requirements.txt
Password:
Collecting astroid==2.3.2
Using cached astroid-2.3.2-py3-none-any.whl (205 kB)
Collecting certifi==2019.9.11
Using cached certifi-2019.9.11-py2.py3-none-any.whl (154 kB)
Collecting chardet==3.0.4
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna==2.8
Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting isort==4.3.21
Using cached isort-4.3.21-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: lazy-object-proxy==1.4.2 in /volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 6)) (1.4.2)
Collecting mccabe==0.6.1
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting oauthlib==3.1.0
Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Processing /root/.cache/pip/wheels/03/22/4e/8993c46d8cbb81c71115a39595162be5ff7193c1810afd4ce2/PlexAPI-3.2.0-py3-none-any.whl
Collecting pylint==2.4.3
Using cached pylint-2.4.3-py3-none-any.whl (302 kB)
Collecting python-dotenv==0.10.3
Using cached python_dotenv-0.10.3-py2.py3-none-any.whl (16 kB)
Collecting requests==2.22.0
Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting requests-cache==0.5.2
Using cached requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
Collecting requests-oauthlib==1.2.0
Using cached requests_oauthlib-1.2.0-py2.py3-none-any.whl (22 kB)
Requirement already satisfied: six==1.12.0 in /volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 15)) (1.12.0)
Collecting tqdm==4.36.1
Using cached tqdm-4.36.1-py2.py3-none-any.whl (52 kB)
Processing /root/.cache/pip/wheels/aa/54/98/934d5f354a3a0e8a74332d5a53db29dd8421938f3394ddeb4e/trakt-2.11.0-py3-none-any.whl
Collecting typed-ast==1.4.0
Using cached typed_ast-1.4.0.tar.gz (206 kB)
Collecting urllib3==1.25.6
Using cached urllib3-1.25.6-py2.py3-none-any.whl (125 kB)
Collecting websocket-client==0.56.0
Using cached websocket_client-0.56.0-py2.py3-none-any.whl (200 kB)
Requirement already satisfied: wrapt==1.11.2 in /volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 21)) (1.11.2)
Collecting beautifulsoup4==4.9.0
Using cached beautifulsoup4-4.9.0-py3-none-any.whl (109 kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.0.1-py3-none-any.whl (32 kB)
Building wheels for collected packages: typed-ast
Building wheel for typed-ast (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-aq7ds8gk
cwd: /tmp/pip-install-rpek9gmd/typed-ast/
Complete output (23 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.5
creating build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-aarch64-3.5/typed_ast
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-aarch64-3.5/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-aarch64-3.5/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-aarch64-3.5
creating build/temp.linux-aarch64-3.5/ast27
creating build/temp.linux-aarch64-3.5/ast27/Parser
creating build/temp.linux-aarch64-3.5/ast27/Python
creating build/temp.linux-aarch64-3.5/ast27/Custom
/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -Iast27/Include -I/volume1/#appstore/py3k/usr/local/include/python3.5m -c ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.5/ast27/Parser/acceler.o
unable to execute '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc': No such file or directory
error: command '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for typed-ast
Running setup.py clean for typed-ast
Failed to build typed-ast
Installing collected packages: typed-ast, astroid, certifi, chardet, idna, isort, mccabe, oauthlib, tqdm, websocket-client, urllib3, requests, PlexAPI, pylint, python-dotenv, requests-cache, requests-oauthlib, trakt, soupsieve, beautifulsoup4
Running setup.py install for typed-ast ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/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-o2yyxpzp/install-record.txt --single-version-externally-managed --compile --install-headers /volume1/#appstore/py3k/usr/local/include/python3.5m/typed-ast
cwd: /tmp/pip-install-rpek9gmd/typed-ast/
Complete output (23 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.5
creating build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-aarch64-3.5/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-aarch64-3.5/typed_ast
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-aarch64-3.5/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-aarch64-3.5/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-aarch64-3.5
creating build/temp.linux-aarch64-3.5/ast27
creating build/temp.linux-aarch64-3.5/ast27/Parser
creating build/temp.linux-aarch64-3.5/ast27/Python
creating build/temp.linux-aarch64-3.5/ast27/Custom
/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -Iast27/Include -I/volume1/#appstore/py3k/usr/local/include/python3.5m -c ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.5/ast27/Parser/acceler.o
unable to execute '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc': No such file or directory
error: command '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/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-o2yyxpzp/install-record.txt --single-version-externally-managed --compile --install-headers /volume1/#appstore/py3k/usr/local/include/python3.5m/typed-ast Check the logs for full command output.
I tried with pip instead of pip3 but the command instantly returns another error message.
Does anybody know how I can resolve this?
(I use a Synology ds218play which does not support Docker)
Thank you very much for any help you can provide.
It seems to be a version issue. I manually installed typed_ast:
pip3 install typed_ast
This installed version 1.4.2
I then updated requirements.txt to match:
typed-ast==1.4.2
After that, installation from requirements.txt worked (not that I needed to do it, but I wanted to check the process)
pip3 install -r requirements.txt
I got a similar error message when trying to pip install -r requirements.txt in a conda environment that was using python=3.9. When I switched to a conda environment, my_env, using python=3.8, then installing requirements worked fine: conda create -n my_env python=3.8
It's a great idea to run into cmd terminal as follows:
pip install typed_ast
Then you should update your requirements.txt file with current updated version, like
typed-ast==1.5.4
Finally run -
pip install -r requirements.txt
Hopes that will work.

Error while installing chatterbot. I don't know what packages to install to solve the error

I am using windows 10 64-bit
I am using python 3.8 64 bit
my system has microsoft visual c++ 2013 redistributable(x86 and x64)
microsoft visual c++ 2015-2019 redistributable (x86 and x64)
visual studio build tools 2019
I don't know to solve the problem. Please help
i have tried pip install --upgrade setuptools
and pip install --upgrade chatterbot also
Microsoft Windows [Version 10.0.17763.292]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\win10>pip install ChatterBot
Collecting ChatterBot
Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting python-dateutil<2.8,>=2.7
Using cached python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB)
Collecting pyyaml<5.2,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Collecting sqlalchemy<1.3,>=1.2
Using cached SQLAlchemy-1.2.19.tar.gz (5.7 MB)
Collecting mathparse<0.2,>=0.1
Using cached mathparse-0.1.2-py3-none-any.whl (7.2 kB)
Collecting pytz
Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting nltk<4.0,>=3.2
Using cached nltk-3.5.zip (1.4 MB)
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\win10\appdata\local\programs\python\python38\python.exe' 'c:\users\win10\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
cwd: None
Complete output (63 lines):
Collecting setuptools
Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
Collecting wheel<0.33.0,>0.32.0
Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
Collecting Cython
Using cached Cython-0.29.16-cp38-cp38-win_amd64.whl (1.7 MB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.3-cp38-cp38-win_amd64.whl (33 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 kB)
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.2-cp38-cp38-win_amd64.whl (20 kB)
Collecting thinc<7.1.0,>=7.0.8
Using cached thinc-7.0.8.tar.gz (1.9 MB)
Collecting blis<0.3.0,>=0.2.1
Using cached blis-0.2.4.tar.gz (1.5 MB)
Collecting wasabi<1.1.0,>=0.0.9
Using cached wasabi-0.6.0-py3-none-any.whl (20 kB)
Collecting srsly<1.1.0,>=0.0.6
Using cached srsly-1.0.2-cp38-cp38-win_amd64.whl (181 kB)
Collecting numpy>=1.7.0
Using cached numpy-1.18.2-cp38-cp38-win_amd64.whl (12.8 MB)
Collecting plac<1.0.0,>=0.9.6
Using cached plac-0.9.6-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0
Using cached tqdm-4.45.0-py2.py3-none-any.whl (60 kB)
Installing collected packages: setuptools, wheel, Cython, cymem, preshed, murmurhash, numpy, blis, wasabi, srsly, plac, tqdm, thinc
Running setup.py install for preshed: started
Running setup.py install for preshed: finished with status 'done'
Running setup.py install for blis: started
Running setup.py install for blis: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\win10\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\win10\\AppData\\Local\\Temp\\pip-install-9fke1se7\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\win10\\AppData\\Local\\Temp\\pip-install-9fke1se7\\blis\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\win10\AppData\Local\Temp\pip-record-3b4oyob4\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay' --compile --install-headers 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay\Include\blis'
cwd: C:\Users\win10\AppData\Local\Temp\pip-install-9fke1se7\blis\
Complete output (26 lines):
BLIS_COMPILER? None
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\blis
copying blis\about.py -> build\lib.win-amd64-3.8\blis
copying blis\benchmark.py -> build\lib.win-amd64-3.8\blis
copying blis\__init__.py -> build\lib.win-amd64-3.8\blis
creating build\lib.win-amd64-3.8\blis\tests
copying blis\tests\common.py -> build\lib.win-amd64-3.8\blis\tests
copying blis\tests\test_dotv.py -> build\lib.win-amd64-3.8\blis\tests
copying blis\tests\test_gemm.py -> build\lib.win-amd64-3.8\blis\tests
copying blis\tests\__init__.py -> build\lib.win-amd64-3.8\blis\tests
copying blis\cy.pyx -> build\lib.win-amd64-3.8\blis
copying blis\py.pyx -> build\lib.win-amd64-3.8\blis
copying blis\cy.pxd -> build\lib.win-amd64-3.8\blis
copying blis\__init__.pxd -> build\lib.win-amd64-3.8\blis
running build_ext
error: [WinError 2] The system cannot find the file specified
msvc
py_compiler msvc
{'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'HOSTTYPE': 'x86_64', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LANG': 'C.UTF-8', 'OLDPWD': '/home/matt/repos/flame-blis', 'VIRTUAL_ENV': '/home/matt/repos/cython-blis/env3.6', 'USER': 'matt', 'PWD': '/home/matt/repos/cython-blis', 'HOME': '/home/matt', 'NAME': 'LAPTOP-OMKOB3VM', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'SHELL': '/bin/bash', 'TERM': 'xterm-256color', 'SHLVL': '1', 'LOGNAME': 'matt', 'PATH': '/home/matt/repos/cython-blis/env3.6/bin:/tmp/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu/Scripts:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu:/mnt/c/Python37/Scripts:/mnt/c/Python37:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/LLVM/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/nodejs:/mnt/c/Users/matt/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/matt/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/matt/AppData/Roaming/npm:/snap/bin:/mnt/c/Program Files/Oracle/VirtualBox', 'PS1': '(env3.6) \\[\\e]0;\\u#\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u#\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ', 'VAGRANT_HOME': '/home/matt/.vagrant.d/', 'LESSOPEN': '| /usr/bin/lesspipe %s', '_': '/home/matt/repos/cython-blis/env3.6/bin/python'}
clang -c C:\Users\win10\AppData\Local\Temp\pip-install-9fke1se7\blis\blis\_src\config\bulldozer\bli_cntx_init_bulldozer.c -o C:\Users\win10\AppData\Local\Temp\tmpsuq10hhw\bli_cntx_init_bulldozer.o -O2 -funroll-all-loops -std=c99 -D_POSIX_C_SOURCE=200112L -DBLIS_VERSION_STRING="0.5.0-6" -DBLIS_IS_BUILDING_LIBRARY -Iinclude\windows-x86_64 -I.\frame\3\ -I.\frame\ind\ukernels\ -I.\frame\1m\ -I.\frame\1f\ -I.\frame\1\ -I.\frame\include -IC:\Users\win10\AppData\Local\Temp\pip-install-9fke1se7\blis\blis\_src\include\windows-x86_64
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\win10\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\win10\\AppData\\Local\\Temp\\pip-install-9fke1se7\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\win10\\AppData\\Local\\Temp\\pip-install-9fke1se7\\blis\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\win10\AppData\Local\Temp\pip-record-3b4oyob4\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay' --compile --install-headers 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay\Include\blis' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\win10\appdata\local\programs\python\python38\python.exe' 'c:\users\win10\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\win10\AppData\Local\Temp\pip-build-env-10eop7rd\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0' Check the logs for full command output.
C:\Users\win10>
chatterbot requires spacy 2.1.9 which requires blis<0.3.0,>=0.2.1. Checking on pypi, only 0.2.4 seems to match these requirements. For this version, only the source package is available when using python 3.8. The whl files only go up to 3.7, which already creates a first option for you: installing python 3.7 instead
If you want to use python 3.8 and use chatterbot, you will need to compile blis from source. Looking at your error, it is trying to run clang. The project description on pypi state that:
If you want to install from source and you’re on Windows, you’ll need to install LLVM
So you will need to install the LLVM compilersuite to get the source installation running.
did you tried upgragding your setuptool?
pip install --upgrade setuptools
On my system with the latest chatterbot only worked with Python 3.7.9 x64.
I'm using VENV to switch between Python versions

Unable to insall Scrapy : "error: command 'gcc' failed with exit status 1"?

I am trying to install Scrapy using following command:
$ sudo pip install scrapy
But after this, it shows following output with an error:
Collecting scrapy
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /usr/local/lib/python3.2/dist-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): queuelib in /usr/local/lib/python3.2/dist-packages (from scrapy)
Collecting pyOpenSSL (from scrapy)
Downloading pyOpenSSL-0.15.1-py2.py3-none-any.whl (102kB)
100% |████████████████████████████████| 106kB 49kB/s
Collecting w3lib>=1.8.0 (from scrapy)
Downloading w3lib-1.12.0-py2.py3-none-any.whl
Collecting lxml (from scrapy)
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 17kB/s
Collecting Twisted>=10.0.0 (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python3.2/dist-packages (from scrapy)
Collecting service-identity (from scrapy)
Downloading service_identity-14.0.0-py2.py3-none-any.whl
Collecting cryptography>=0.7 (from pyOpenSSL->scrapy)
Downloading cryptography-1.1.tar.gz (348kB)
100% |████████████████████████████████| 352kB 404kB/s
Collecting zope.interface>=4.0.2 (from Twisted>=10.0.0->scrapy)
Collecting characteristic>=14.0.0 (from service-identity->scrapy)
Downloading characteristic-14.3.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->scrapy)
Downloading pyasn1_modules-0.0.8-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/local/lib/python3.2/dist-packages (from service-identity->scrapy)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Collecting cffi>=1.1.0 (from cryptography>=0.7->pyOpenSSL->scrapy)
Downloading cffi-1.3.0.tar.gz (347kB)
100% |████████████████████████████████| 348kB 9.7kB/s
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.2/dist-packages (from cffi>=1.1.0->cryptography>=0.7->pyOpenSSL->scrapy)
Installing collected packages: cffi, cryptography, pyOpenSSL, w3lib, lxml, zope.interface, Twisted, characteristic, pyasn1-modules, service-identity, scrapy
Running setup.py install for cffi
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-mdfh82/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lluuq6-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-3.2
creating build/lib.linux-i686-3.2/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-i686-3.2/cffi
copying cffi/gc_weakref.py -> build/lib.linux-i686-3.2/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-i686-3.2/cffi
copying cffi/lock.py -> build/lib.linux-i686-3.2/cffi
copying cffi/api.py -> build/lib.linux-i686-3.2/cffi
copying cffi/__init__.py -> build/lib.linux-i686-3.2/cffi
copying cffi/model.py -> build/lib.linux-i686-3.2/cffi
copying cffi/ffiplatform.py -> build/lib.linux-i686-3.2/cffi
copying cffi/cparser.py -> build/lib.linux-i686-3.2/cffi
copying cffi/verifier.py -> build/lib.linux-i686-3.2/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-i686-3.2/cffi
copying cffi/recompiler.py -> build/lib.linux-i686-3.2/cffi
copying cffi/commontypes.py -> build/lib.linux-i686-3.2/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-i686-3.2/cffi
copying cffi/vengine_gen.py -> build/lib.linux-i686-3.2/cffi
copying cffi/_cffi_include.h -> build/lib.linux-i686-3.2/cffi
copying cffi/parse_c_type.h -> build/lib.linux-i686-3.2/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-i686-3.2
creating build/temp.linux-i686-3.2/c
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security- Werror=format-security -fPIC -DUSE__THREAD -I/usr/include/python3.2mu -c c/_cffi_backend.c -o build/temp.linux-i686-3.2/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-mdfh82/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lluuq6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mdfh82/cffi
FAIL
I searched for any solution and on the basis of one of the recommendation I also tried to install python-dev using command :
$ sudo apt-get install python-dev
But this too showed that python-dev is the newest version:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version.
Can anybody help me in solving this issue?
Your problem is:
c/_cffi_backend.c:14:17: error: ffi.h: No such file or directory
Try to search libffi-devel or libiffi-dev using to confirm the exact package name:
sudo apt-cache search libiffi
Then install the package using:
sudo apt-get install libiffi-dev
Hope it will help

Categories

Resources