I just tried to run a simple
sudo pip install scrapy
and after the download of every component it gives me an error:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-s37cTl/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-62NAJB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-s37cTl/cffi
I satisfy all the dependecies, don't know what can be.
I run Debian 7.
Thanks!
EDIT: I paste the whole installations terminal output:
:~$ sudo pip install scrapy
Collecting scrapy
Using cached Scrapy-0.24.5-py2-none-any.whl
Collecting cssselect>=0.9 (from scrapy)
Using cached cssselect-0.9.1.tar.gz
Collecting queuelib (from scrapy)
Using cached queuelib-1.2.2-py2.py3-none-any.whl
Collecting pyOpenSSL (from scrapy)
Using cached pyOpenSSL-0.14.tar.gz
Collecting w3lib>=1.8.0 (from scrapy)
Using cached w3lib-1.11.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/local/lib/python2.7/dist-packages (from scrapy)
Collecting Twisted>=10.0.0 (from scrapy)
Using cached Twisted-15.0.0.tar.bz2
Collecting six>=1.5.2 (from scrapy)
Using cached six-1.9.0-py2.py3-none-any.whl
Collecting cryptography>=0.2.1 (from pyOpenSSL->scrapy)
Using cached cryptography-0.8.tar.gz
Collecting zope.interface>=3.6.0 (from Twisted>=10.0.0->scrapy)
Using cached zope.interface-4.1.2.tar.gz
Collecting pyasn1 (from cryptography>=0.2.1->pyOpenSSL->scrapy)
Using cached pyasn1-0.1.7.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from cryptography>=0.2.1->pyOpenSSL->scrapy)
Collecting enum34 (from cryptography>=0.2.1->pyOpenSSL->scrapy)
Using cached enum34-1.0.4.tar.gz
Collecting cffi>=0.8 (from cryptography>=0.2.1->pyOpenSSL->scrapy)
Using cached cffi-0.9.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=0.8->cryptography>=0.2.1->pyOpenSSL->scrapy)
Installing collected packages: cffi, enum34, pyasn1, zope.interface, cryptography, six, Twisted, w3lib, pyOpenSSL, queuelib, cssselect, scrapy
Running setup.py install for cffi
building '_cffi_backend' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-i686-2.7/c/_cffi_backend.o
c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-tIHlcr/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dPM9YP-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/cffi
copying cffi/lock.py -> build/lib.linux-i686-2.7/cffi
copying cffi/model.py -> build/lib.linux-i686-2.7/cffi
copying cffi/api.py -> build/lib.linux-i686-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-i686-2.7/cffi
copying cffi/gc_weakref.py -> build/lib.linux-i686-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-i686-2.7/cffi
copying cffi/verifier.py -> build/lib.linux-i686-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-i686-2.7/cffi
copying cffi/__init__.py -> build/lib.linux-i686-2.7/cffi
copying cffi/cparser.py -> build/lib.linux-i686-2.7/cffi
copying cffi/commontypes.py -> build/lib.linux-i686-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-i686-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/c
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-i686-2.7/c/_cffi_backend.o
c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-tIHlcr/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dPM9YP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tIHlcr/cffi
On Mint 17, I was able to install Scrapy after installing following packages:
sudo apt-get install libffi-dev libssl-dev libxml2-dev libxslt1-dev
For CentOS
yum install libffi libffi-devel
then
pip install cffi
pip install Scrapy
Related
This question already has answers here:
fatal error: Python.h: No such file or directory
(35 answers)
Closed 1 year ago.
I want to use the PyTLDR. Someone in the issue section on GitHub stated that the module was written in Python 2. Therefore, I set up a Python 2.7 environment for this project.
My pip version is 20.3 which should still work for Python 2 modules.
While installing the PyTLDR module via pip install pytldr I got the following error message:
[33mDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.[0m
Processing /home/zyko/.cache/pip/wheels/ba/d8/92/30e242ea7de520ed1eaf44ba37f7e73a2ac1e6b4e305b99e74/PyTLDR-0.1.4-py2-none-any.whl
Processing /home/zyko/.cache/pip/wheels/c7/b1/76/54236c34227a12d32dc9cfe18731976baf8950d8a5aabaea6c/nltk-3.5-py2-none-any.whl
Collecting numpy>=1.8.0
Using cached numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0 MB)
Collecting scipy>=0.13.2
Using cached scipy-1.2.3-cp27-cp27mu-manylinux1_x86_64.whl (24.8 MB)
Processing /home/zyko/.cache/pip/wheels/df/80/48/106e63760ff0dcd3658613d93c1ecf64301b9261172f2c1acf/networkx-2.2-py2.py3-none-any.whl
Processing /home/zyko/.cache/pip/wheels/09/dd/9a/3eff624a1731b5df39e1a946425532b9c1e0330c4e705a629d/goose_extractor-1.0.25-py2-none-any.whl
Collecting scikit-learn>=0.15.2
Using cached scikit_learn-0.20.4-cp27-cp27mu-manylinux1_x86_64.whl (5.5 MB)
Requirement already satisfied: tqdm in ./venv/lib/python2.7/site-packages (from nltk>=3.0.0->pytldr) (4.61.1)
Requirement already satisfied: click in ./venv/lib/python2.7/site-packages (from nltk>=3.0.0->pytldr) (7.1.2)
Requirement already satisfied: joblib in ./venv/lib/python2.7/site-packages (from nltk>=3.0.0->pytldr) (0.14.1)
Collecting regex
Using cached regex-2021.4.4.tar.gz (693 kB)
Requirement already satisfied: decorator>=4.3.0 in ./venv/lib/python2.7/site-packages (from networkx>=1.9.1->pytldr) (4.4.2)
Collecting cssselect
Using cached cssselect-1.1.0-py2.py3-none-any.whl (16 kB)
Processing /home/zyko/.cache/pip/wheels/4b/8e/29/f0d0909969495c5f279c6cba4ceca07db79a0f7bb54f3f087b/jieba-0.42.1-py2-none-any.whl
Collecting beautifulsoup
Using cached BeautifulSoup-3.2.2-py2-none-any.whl (32 kB)
Collecting lxml
Using cached lxml-4.6.3-cp27-cp27mu-manylinux1_x86_64.whl (5.5 MB)
Collecting Pillow
Using cached Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl (2.1 MB)
Building wheels for collected packages: regex
Building wheel for regex (setup.py) ... [?25l- error
[31m ERROR: Command errored out with exit status 1:
command: /home/zyko/PycharmProjects/PyTLDR/venv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9Mtbpc/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9Mtbpc/regex/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-URFXXo
cwd: /tmp/pip-install-9Mtbpc/regex/
Complete output (20 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/regex
copying regex_2/__init__.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/regex.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/_regex_core.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/test_regex.py -> build/lib.linux-x86_64-2.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/regex_2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex_2/_regex.c -o build/temp.linux-x86_64-2.7/regex_2/_regex.o
regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory
50 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------[0m
[31m ERROR: Failed building wheel for regex[0m
[?25h Running setup.py clean for regex
Failed to build regex
Installing collected packages: regex, nltk, numpy, scipy, networkx, cssselect, jieba, beautifulsoup, lxml, Pillow, goose-extractor, scikit-learn, pytldr
Running setup.py install for regex ... [?25l- error
[31m ERROR: Command errored out with exit status 1:
command: /home/zyko/PycharmProjects/PyTLDR/venv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9Mtbpc/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9Mtbpc/regex/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-pYEqUQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/zyko/PycharmProjects/PyTLDR/venv/include/site/python2.7/regex
cwd: /tmp/pip-install-9Mtbpc/regex/
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/regex
copying regex_2/__init__.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/regex.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/_regex_core.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/test_regex.py -> build/lib.linux-x86_64-2.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/regex_2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex_2/_regex.c -o build/temp.linux-x86_64-2.7/regex_2/_regex.o
regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory
50 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------[0m
[31mERROR: Command errored out with exit status 1: /home/zyko/PycharmProjects/PyTLDR/venv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9Mtbpc/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9Mtbpc/regex/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-pYEqUQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/zyko/PycharmProjects/PyTLDR/venv/include/site/python2.7/regex Check the logs for full command output.[0m
[33mWARNING: You are using pip version 20.3; however, version 20.3.4 is available.
You should consider upgrading via the '/home/zyko/PycharmProjects/PyTLDR/venv/bin/python2.7 -m pip install --upgrade pip' command.[0m
[?25h
It looks like the regex module can not be installed. A manual pip install regex throws the same error message.
How can I get regex to work within the old Python 2.7 version and subsequently get the PyTLDR module to work properly?
First thing, read the first line of the output: You should not start new projects in python2.
However, the issue is quite straightforward:
regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory
50 | #include "Python.h"
| ^~~~~~~~~~
This means that you don't have the headers for python dev installed.
Fix is quite straightforward as well (assuming you're running ubuntu or debian:
sudo apt-get install python-dev
I'm having issues building wheel for psycopg2 thru pip install -r requirements.txt. I'm on ubuntu 20.04 + python 3.8.5 + venv.
This is my requirements.txt:
amqp==2.6.1
anyjson==0.3.3
asgiref==3.2.10
billiard==3.6.3.0
brotlipy==0.7.0
celery==4.4.7
celery-progress==0.0.12
certifi==2020.6.20
cffi==1.14.2
chardet==3.0.4
cryptography==3.1
Django==3.0.3
dj-database-url==0.5.0
django-celery-results==1.2.1
django-cors-headers==3.5.0
django-crispy-forms==1.9.2
django-heroku==0.3.1
django-rest-framework==0.1.0
django-templated-mail==1.1.1
djangorestframework==3.11.1
djoser==2.0.5
fake-useragent==0.1.11
future==0.18.2
gunicorn==20.0.4
httpie==2.2.0
idna==2.10
kombu==4.6.11
lxml==4.5.2
pika==1.1.0
psycopg2==2.8.5
pycparser==2.20
Pygments==2.7.0
pyOpenSSL==19.1.0
PySocks==1.7.1
python-dateutil==2.8.1
python-decouple==3.3
pytz==2020.1
requests==2.24.0
six==1.15.0
SQLAlchemy==1.3.19
sqlparse==0.3.1
urllib3==1.25.10
vine==1.3.0
whitenoise==5.2.0
This is the output when I pip install -r requirements.txt:
[...]
Collecting urllib3==1.25.10
Using cached urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
Collecting vine==1.3.0
Using cached vine-1.3.0-py2.py3-none-any.whl (14 kB)
Collecting whitenoise==5.2.0
Using cached whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: setuptools>=3.0 in ./venv/lib/python3.8/site-packages (from gunicorn==20.0.4->-r requirements.txt (line 24)) (44.0.0)
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1xr9yjk0/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1xr9yjk0/psycopg2/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-b8g9assp
cwd: /tmp/pip-install-1xr9yjk0/psycopg2/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: vine, amqp, anyjson, asgiref, billiard, pycparser, cffi, brotlipy, kombu, pytz, celery, celery-progress, certifi, chardet, six, cryptography, sqlparse, Django, dj-database-url, django-celery-results, django-cors-headers, django-crispy-forms, whitenoise, psycopg2, django-heroku, djangorestframework, django-rest-framework, django-templated-mail, djoser, fake-useragent, future, gunicorn, idna, urllib3, requests, Pygments, httpie, lxml, pika, pyOpenSSL, PySocks, python-dateutil, python-decouple, SQLAlchemy
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1xr9yjk0/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1xr9yjk0/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-8dtfz_uf/install-record.txt --single-version-externally-managed --compile --install-headers /home/pierre/Workspace/campground_scavanger/venv/include/site/python3.8/psycopg2
cwd: /tmp/pip-install-1xr9yjk0/psycopg2/
Complete output (40 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/compat.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120005 -DHAVE_LO64=1 -I/home/pierre/Workspace/campground_scavanger/venv/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:
./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory
36 | #include <libpq-fe.h>
| ^~~~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1xr9yjk0/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1xr9yjk0/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-8dtfz_uf/install-record.txt --single-version-externally-managed --compile --install-headers /home/pierre/Workspace/campground_scavanger/venv/include/site/python3.8/psycopg2 Check the logs for full command output.
Googling the first error error: invalid command 'bdist_wheel' led me to run pip install wheel in my venv. Successfully installed wheel-0.36.2. Not sure if this is related whatsoever with my psycopg2 issue hereafter but I'm showing all the steps I'm doing.
I then reran pip install -r requirements.txt and now only the psycopg2 issue shows up:
[...]
Requirement already satisfied: vine==1.3.0 in ./venv/lib/python3.8/site-packages (from -r requirements.txt (line 43)) (1.3.0)
Requirement already satisfied: whitenoise==5.2.0 in ./venv/lib/python3.8/site-packages (from -r requirements.txt (line 44)) (5.2.0)
Requirement already satisfied: setuptools>=3.0 in ./venv/lib/python3.8/site-packages (from gunicorn==20.0.4->-r requirements.txt (line 24)) (44.0.0)
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zxwqo979/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zxwqo979/psycopg2/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-fknnvsn3
cwd: /tmp/pip-install-zxwqo979/psycopg2/
Complete output (40 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/compat.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120005 -DHAVE_LO64=1 -I/home/pierre/Workspace/campground_scavanger/venv/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:
./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory
36 | #include <libpq-fe.h>
| ^~~~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2, django-heroku, djangorestframework, django-rest-framework, django-templated-mail, djoser, fake-useragent, future, gunicorn, urllib3, idna, requests, Pygments, httpie, lxml, pika, pyOpenSSL, PySocks, python-dateutil, python-decouple, SQLAlchemy
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zxwqo979/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zxwqo979/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-r4aij71q/install-record.txt --single-version-externally-managed --compile --install-headers /home/pierre/Workspace/campground_scavanger/venv/include/site/python3.8/psycopg2
cwd: /tmp/pip-install-zxwqo979/psycopg2/
Complete output (40 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/compat.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120005 -DHAVE_LO64=1 -I/home/pierre/Workspace/campground_scavanger/venv/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:
./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory
36 | #include <libpq-fe.h>
| ^~~~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pierre/Workspace/campground_scavanger/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zxwqo979/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zxwqo979/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-r4aij71q/install-record.txt --single-version-externally-managed --compile --install-headers /home/pierre/Workspace/campground_scavanger/venv/include/site/python3.8/psycopg2 Check the logs for full command output.
I replaced psycopg2==2.8.5 by psycopg2-binary==2.8.5 as per some other stackoverflow threads but the same issue remains during the pip install -r requirements.txt .
If I install manually psycopg2-binary in my venv it works fine:
(venv) pierre#thinkpad:~/Workspace/campground_scavanger$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached psycopg2_binary-2.8.6-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.8.6
But then again if I comment out psycopg2==2.8.5 (or psycopg2-binary==2.8.5 and rerun pip install -r requirements.txt, I keep getting the same error message.
I'm not quite sure why there is a Building wheels for collected packages: psycopg2 even if psycopg2 is commented out in my requirements.txt. Dependency with another package?
Instead pip command use:
sudo apt-get install libpq-dev
then use:
pip install psycopg2
On Ubuntu, do you can install psycopg2-binary
pip install psycopg2-binary
Looks like you need to install libpq-dev according to this Problems compiling and installing psycopg2.
pip install libpq-dev should work or perhaps a specific version may be required. About psycopg2 being commented yet it being attempted to install by pip it may be a requirement of one of your other dependencies.
After installing the right psycopg2==2.8.5 version, also check if your database is spatial and the right setting is there in your settings.py file for example if you are using postgres, set your database engine connection to;
'ENGINE': 'django.db.backends.postgresql_psycopg2',
This is the error I am getting when trying to install nltk.
Collecting nltk
Using cached nltk-3.5.zip (1.4 MB)
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from nltk) (7.1.2)
Requirement already satisfied: joblib in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from nltk) (0.16.0)
Collecting regex
Using cached regex-2020.7.14.tar.gz (690 kB)
Collecting tqdm
Using cached tqdm-4.49.0-py2.py3-none-any.whl (69 kB)
Using legacy 'setup.py install' for nltk, since package 'wheel' is not installed.
Using legacy 'setup.py install' for regex, since package 'wheel' is not installed.
Installing collected packages: regex, tqdm, nltk
Running setup.py install for regex ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-izrsarsv/regex/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-izrsarsv/regex/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/tmp/pip-record-cqr8q0er/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex
cwd: /private/tmp/pip-install-izrsarsv/regex/
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
running build_ext
building 'regex._regex' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/regex_3
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.8/regex_3/_regex.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-izrsarsv/regex/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-izrsarsv/regex/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/tmp/pip-record-cqr8q0er/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex Check the logs for full command output.
My python & pip are up to date. Does anyone know how to successfully install this package?
I´ve been trying to install ChatterBot, its a new machine so its pretty much a fresh installation of python, i'am running python 3.8 64bits
Complete log
C:\Users\Marcos>pip install chatterbot
Collecting chatterbot
Using cached https://files.pythonhosted.org/packages/6c/0e/dac0d82f34f86bf509cf5ef3e2dfc5aa7d444bd843a2330ceb7d854f84f2/ChatterBot-1.0.5-py2.py3-none-any.whl
Collecting pint>=0.8.1
Using cached https://files.pythonhosted.org/packages/90/f9/2bdadf95328c02e57a79e5370d1e911a9c6fdb9952b6c4de44d6c7052978/Pint-0.10.1-py2.py3-none-any.whl
Collecting sqlalchemy<1.3,>=1.2
Downloading https://files.pythonhosted.org/packages/f9/67/d07cf7ac7e6dd0bc55ba62816753f86d7c558107104ca915e730c9ec2512/SQLAlchemy-1.2.19.tar.gz (5.7MB)
|████████████████████████████████| 5.7MB 6.8MB/s
Requirement already satisfied: pytz in c:\users\marcos\appdata\local\programs\python\python38\lib\site-packages (from chatterbot) (2019.3)
Collecting mathparse<0.2,>=0.1
Using cached https://files.pythonhosted.org/packages/c3/e5/4910fb85950cb960fcf3f5aabe1c8e55f5c9201788a1c1302b570a7e1f84/mathparse-0.1.2-py3-none-any.whl
Collecting nltk<4.0,>=3.2
Using cached https://files.pythonhosted.org/packages/f6/1d/d925cfb4f324ede997f6d47bea4d9babba51b49e87a767c170b77005889d/nltk-3.4.5.zip
Collecting python-dateutil<2.8,>=2.7
Using cached https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl
Collecting pymongo<4.0,>=3.3
Downloading https://files.pythonhosted.org/packages/77/5e/f30374f2a997710913c7616eb087e6473ccfd8a46eacee956d7fb8c7dd27/pymongo-3.10.1-cp38-cp38-win_amd64.whl (355kB)
|████████████████████████████████| 358kB 6.4MB/s
Collecting pyyaml<5.2,>=5.1
Using cached https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz
Collecting spacy<2.2,>=2.1
Using cached https://files.pythonhosted.org/packages/1f/e2/46650d03c7ff2b57ed7af211d41c3f606540f7adea92b5af65fcf9f605c0/spacy-2.1.9.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\marcos\appdata\local\programs\python\python38\python.exe' 'c:\users\marcos\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Marcos\AppData\Local\Temp\pip-build-env-nntoyoz6\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 (62 lines):
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/af/e7/02db816dc88c598281bacebbb7ccf2c9f1a6164942e88f1a0fded8643659/setuptools-45.0.0-py2.py3-none-any.whl
Collecting wheel<0.33.0,>0.32.0
Using cached https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl
Collecting Cython
Using cached https://files.pythonhosted.org/packages/41/2c/9d873fc8d1be29af12a1d41707461399327396da10e50e183754aa4136b9/Cython-0.29.14-cp38-cp38-win_amd64.whl
Collecting cymem<2.1.0,>=2.0.2
Using cached https://files.pythonhosted.org/packages/8c/1f/43be34e4decc602fae2bda73b05525bc49deff44baeb95611b23a2929195/cymem-2.0.3-cp38-cp38-win_amd64.whl
Collecting preshed<2.1.0,>=2.0.1
Using cached https://files.pythonhosted.org/packages/0b/14/c9aa735cb9c131545fc9e23031baccb87041ac9215b3d75f99e3cf18f6a3/preshed-2.0.1.tar.gz
Collecting murmurhash<1.1.0,>=0.28.0
Using cached https://files.pythonhosted.org/packages/5b/73/129c1aed56c88a446c70e4eda186fe014bfb8330478e5e257cc923bd3e15/murmurhash-1.0.2-cp38-cp38-win_amd64.whl
Collecting thinc<7.1.0,>=7.0.8
Using cached https://files.pythonhosted.org/packages/92/39/ea2a3d5b87fd52fc865fd1ceb7b91dca1f85e227d53e7a086d260f6bcb93/thinc-7.0.8.tar.gz
Collecting blis<0.3.0,>=0.2.1
Using cached https://files.pythonhosted.org/packages/59/9e/84a83616cbe5daa94909da38b780e93bf566dc2113c3dc35d7b4cad52f63/blis-0.2.4.tar.gz
Collecting wasabi<1.1.0,>=0.0.9
Using cached https://files.pythonhosted.org/packages/21/e1/e4e7b754e6be3a79c400eb766fb34924a6d278c43bb828f94233e0124a21/wasabi-0.6.0-py3-none-any.whl
Collecting srsly<1.1.0,>=0.0.6
Using cached https://files.pythonhosted.org/packages/a1/bb/0982e39b1a6dd652d7605f199cc5209746145f3a9e677c0014302cc22f66/srsly-1.0.1-cp38-cp38-win_amd64.whl
Collecting numpy>=1.7.0
Using cached https://files.pythonhosted.org/packages/95/47/ea0ae5a778aae07ede486f3dc7cd4b788dc53e11b01a17251b020f76a01d/numpy-1.18.1-cp38-cp38-win_amd64.whl
Collecting plac<1.0.0,>=0.9.6
Using cached https://files.pythonhosted.org/packages/9e/9b/62c60d2f5bc135d2aa1d8c8a86aaf84edb719a59c7f11a4316259e61a298/plac-0.9.6-py2.py3-none-any.whl
Collecting tqdm<5.0.0,>=4.10.0
Using cached https://files.pythonhosted.org/packages/72/c9/7fc20feac72e79032a7c8138fd0d395dc6d8812b5b9edf53c3afd0b31017/tqdm-4.41.1-py2.py3-none-any.whl
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\marcos\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Marcos\\AppData\\Local\\Temp\\pip-install-dsthm_0n\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\Marcos\\AppData\\Local\\Temp\\pip-install-dsthm_0n\\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\Marcos\AppData\Local\Temp\pip-record-md34dflk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Marcos\AppData\Local\Temp\pip-build-env-nntoyoz6\overlay' --compile
cwd: C:\Users\Marcos\AppData\Local\Temp\pip-install-dsthm_0n\blis\
Complete output (25 lines):
BLIS_COMPILER? None
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] O sistema não pode encontrar o arquivo especificado
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\Marcos\AppData\Local\Temp\pip-install-dsthm_0n\blis\blis\_src\config\bulldozer\bli_cntx_init_bulldozer.c -o C:\Users\Marcos\AppData\Local\Temp\tmpweh55tja\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\Marcos\AppData\Local\Temp\pip-install-dsthm_0n\blis\blis\_src\include\windows-x86_64
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\marcos\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Marcos\\AppData\\Local\\Temp\\pip-install-dsthm_0n\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\Marcos\\AppData\\Local\\Temp\\pip-install-dsthm_0n\\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\Marcos\AppData\Local\Temp\pip-record-md34dflk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Marcos\AppData\Local\Temp\pip-build-env-nntoyoz6\overlay' --compile Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\marcos\appdata\local\programs\python\python38\python.exe' 'c:\users\marcos\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Marcos\AppData\Local\Temp\pip-build-env-nntoyoz6\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.
ChatterBot indirectly required blis==0.2.4 and the version doesn't provide precompiled wheels for Python 3.8. My advice is to downgrade to Python 3.7.
If you want to compile blis for Python 3.8 see the compilation instructions at https://github.com/explosion/cython-blis#installation:
If you want to install from source and you're on Windows, you'll need to install LLVM.
I followed the installation steps in
https://gist.github.com/azvoleff/f8f06d22a8a4d89401e09d6607a5ecc4
to install cartoDB to Ubuntu 16.04.
everything is fine and installed correctly (although i used RVM instead of getting ruby's source code and compile it myself as suggested from the steps).
but when running:
pip install --no-use-wheel -r python_requirements.txt
there is an error, says about gdal, but it's different with the error mentioned in the steps.
DEPRECATION: --no-use-wheel is deprecated and will be removed in the future. Please use --no-binary :all: instead.
Requirement already satisfied: chardet==2.3.0 in /usr/local/lib/python2.7/dist-packages (from -r python_requirements.txt (line 1))
Requirement already satisfied: argparse==1.2.1 in /usr/lib/python2.7 (from -r python_requirements.txt (line 2))
Requirement already satisfied: brewery==0.6 in /usr/local/lib/python2.7/dist-packages (from -r python_requirements.txt (line 3))
Requirement already satisfied: redis==2.4.9 in /usr/local/lib/python2.7/dist-packages (from -r python_requirements.txt (line 4))
Requirement already satisfied: python-varnish==0.1.2 in /usr/local/lib/python2.7/dist-packages (from -r python_requirements.txt (line 5))
Collecting gdal==1.10.0 (from -r python_requirements.txt (line 6))
Using cached GDAL-1.10.0.tar.gz
Collecting csvkit==0.9.0 (from -r python_requirements.txt (line 7))
Using cached csvkit-0.9.0.tar.gz
Collecting openpyxl==2.1.3 (from -r python_requirements.txt (line 8))
Using cached openpyxl-2.1.3.tar.gz
Collecting xlrd>=0.7.1 (from csvkit==0.9.0->-r python_requirements.txt (line 7))
Using cached xlrd-1.1.0.tar.gz
Collecting sqlalchemy>=0.6.6 (from csvkit==0.9.0->-r python_requirements.txt (line 7))
Using cached SQLAlchemy-1.2.0.tar.gz
Collecting six>=1.6.1 (from csvkit==0.9.0->-r python_requirements.txt (line 7))
Using cached six-1.11.0.tar.gz
Collecting python-dateutil==2.2 (from csvkit==0.9.0->-r python_requirements.txt (line 7))
Using cached python-dateutil-2.2.tar.gz
Collecting dbf==0.94.003 (from csvkit==0.9.0->-r python_requirements.txt (line 7))
Using cached dbf-0.94.003.tar.gz
Collecting jdcal (from openpyxl==2.1.3->-r python_requirements.txt (line 8))
Using cached jdcal-1.3.tar.gz
Skipping bdist_wheel for gdal, due to binaries being disabled for it.
Skipping bdist_wheel for csvkit, due to binaries being disabled for it.
Skipping bdist_wheel for openpyxl, due to binaries being disabled for it.
Skipping bdist_wheel for xlrd, due to binaries being disabled for it.
Skipping bdist_wheel for sqlalchemy, due to binaries being disabled for it.
Skipping bdist_wheel for six, due to binaries being disabled for it.
Skipping bdist_wheel for python-dateutil, due to binaries being disabled for it.
Skipping bdist_wheel for dbf, due to binaries being disabled for it.
Skipping bdist_wheel for jdcal, due to binaries being disabled for it.
Installing collected packages: gdal, xlrd, sqlalchemy, jdcal, openpyxl, six, python-dateutil, dbf, csvkit
Found existing installation: GDAL 2.2.0
Uninstalling GDAL-2.2.0:
Successfully uninstalled GDAL-2.2.0
Running setup.py install for gdal ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-U2YlBY/gdal/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-UB4Lg0-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying gdal.py -> build/lib.linux-x86_64-2.7
copying ogr.py -> build/lib.linux-x86_64-2.7
copying osr.py -> build/lib.linux-x86_64-2.7
copying gdalconst.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/extensions
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.7 -I. -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/gdal_wrap.cpp:2853:22: fatal error: cpl_port.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of GDAL
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-U2YlBY/gdal/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-UB4Lg0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-U2YlBY/gdal/
i'm new in ubuntu, previously i tried to set this up on centos (because i'm more familiar with centos), but it was worse than using ubuntu because many dependencies are missing / out of date.
do anyone have any suggestion on how to successfully setup cartoDB in ubuntu / any other linux based machine? (or what should i do with this compile error?)
i guess i should get gdal version 1.10.0 ? but how to do that in ubuntu...
[UPDATE-1]
Maybe it's because cpl_port.h not found from this error
extensions/gdal_wrap.cpp:2853:22: fatal error: cpl_port.h: No such file or directory
so, i did install libgdal-dev per Oz123 suggests.
apt-get install libgdal-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgdal-dev is already the newest version (2.2.2+dfsg-1~xenial1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
and my GDAL version is
gdalinfo --version
GDAL 2.2.2, released 2017/09/15
and sadly, error is still the same.
i'm still trying to find out how to compile / change installed GDAL version to 1.10.0 because i assume the requirement is GDAL 1.10.0 and what i have is 2.2.2, that's why it tries to compile again, am i correct with this?
...
Collecting gdal==1.10.0 (from -r python_requirements.txt (line 6))
Using cached GDAL-1.10.0.tar.gz
...
Installing collected packages: gdal, xlrd, sqlalchemy, jdcal, openpyxl, six, python-dateutil, dbf, csvkit
Found existing installation: GDAL 2.2.0
Uninstalling GDAL-2.2.0:
Successfully uninstalled GDAL-2.2.0
Running setup.py install for gdal ... error
...
[UPDATE-2-ANSWER FOR THIS SPECIFIC PROBLEM]
thx to Oz123, I execute:
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
and retry the compile, and it fix this cpl_port.h problem. but the installation still failed at the same installation step (GDAL compile), but i think i should ask this in different thread to keep this stack clean.
This is probably because you are missing libgdal-dev (found through ubuntu package content search).
When ever you install a package with hard coded C dependecies you should make sure you have the build-dependencies.
I guess I should get gdal version 1.10.0 ? but how to do that in
ubuntu...
If you followed this step:
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
You will get a later version of GDAL.
Never the less, you should install the build dependency, libgdal-dev with sudo apt-get install libgdal-dev, the repeat pip install --no-use-wheel -r python_requirements.txt, if you get more errors, look for the missing header file in the ubuntu packages content search pages, install the package and repeat until complete.
You should also pass the paths to pip:
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install --no-use-wheel -r python_requirements.txt