- Python 3.8.2
- cffi 1.14.3
- cryptography 3.2.1
- MacOS: Bug Sur (11.0.1) (macbook pro 2017 without Apple Silicon)
run:
pip3 install cryptography
or run with flags:
sudo CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS="1" LDFLAGS="/usr/local/opt/openssl/lib/libcrypto.a /usr/local/opt/openssl/lib/libssl.a" CFLAGS="-I/usr/local/opt/openssl/install/include" pip3 install cryptography
(or try cffi, same mistake)
error output:
Collecting cryptography
Using cached cryptography-3.2.1.tar.gz (540 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Users/user1/electrum/venv/bin/python /Users/user1/electrum/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (106 lines):
Collecting setuptools>=40.6.0
Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cffi!=1.11.3,>=1.8
Using cached cffi-1.14.3.tar.gz (470 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/user1/electrum/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-wheel-3a5oczuy
cwd: /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
creating build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/c
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/openssl/include -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/user1/electrum/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
#error Apple Arm64 ABI requires ffi_prep_cif_var
^
c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ffi_prep_closure(closure, &cif_descr->cif,
^
2 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/user1/electrum/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-record-_09codn4/install-record.txt --single-version-externally-managed --prefix /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay --compile --install-headers /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay/include/site/python3.8/cffi
cwd: /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/
Complete output (39 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
creating build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/c
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/openssl/include -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/user1/electrum/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
#error Apple Arm64 ABI requires ffi_prep_cif_var
^
c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ffi_prep_closure(closure, &cif_descr->cif,
^
2 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/user1/electrum/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-install-crt2d8tu/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-record-_09codn4/install-record.txt --single-version-externally-managed --prefix /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay --compile --install-headers /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay/include/site/python3.8/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/user1/electrum/venv/bin/python /Users/user1/electrum/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/vv/5zc7f2ns7x3dnxrmm01dqm9w0000gn/T/pip-build-env-70l3p56h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
I was wanting to install an old project that I pushed to Github. When I pip install -r requirements.txt
, it goes through the process of installing the dependencies for the project. Yet, it reaches a point where it crashes and displays the following…
What would be causing this and what are remedies to address this error so the project can fully install dependencies and run without error upon installation?
Collecting peewee==3.9.2
Downloading peewee-3.9.2.tar.gz (2.2 MB)
|████████████████████████████████| 2.2 MB 312 kB/s
Collecting pycparser==2.19
Using cached pycparser-2.19.tar.gz (158 kB)
Collecting six==1.12.0
Using cached six-1.12.0-py2.py3-none-any.whl (10 kB)
Collecting Werkzeug==0.14.1
Using cached Werkzeug-0.14.1-py2.py3-none-any.whl (322 kB)
Collecting WTForms==2.2.1
Using cached WTForms-2.2.1-py2.py3-none-any.whl (166 kB)
Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
Using legacy 'setup.py install' for Flask-Bcrypt, since package 'wheel' is not installed.
Using legacy 'setup.py install' for Flask-Login, since package 'wheel' is not installed.
Using legacy 'setup.py install' for peewee, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pycparser, since package 'wheel' is not installed.
Installing collected packages: pycparser, MarkupSafe, Werkzeug, six, Jinja2, itsdangerous, Click, cffi, WTForms, Flask, bcrypt, peewee, Flask-WTF, Flask-Login, Flask-Bcrypt
Running setup.py install for pycparser ... done
Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
command: 'c:users........venvscriptspython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\..\..\..\..\..\pip-install-httq50y3\cffi_e5ad43512ad74ac6a994d6368069a3d3\setup.py'"'"'; __file__='"'"'C:\Users\Binny\AppData\Local\Temp\pip-install-httq50y3\cffi_e5ad43512ad74ac6a994d6368069a3d3\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('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:..........pip-record-37a4io_jinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:..........venvincludesitepython3.9cffi'
cwd: C:........Temppip-install-httq50y3cffi_e5ad43512ad74ac6a994d6368069a3d3
Complete output (122 lines):
_configtest.c
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.9
creating buildlib.win-amd64-3.9cffi
copying cffiapi.py -> buildlib.win-amd64-3.9cffi
copying cffibackend_ctypes.py -> buildlib.win-amd64-3.9cffi
copying cfficffi_opcode.py -> buildlib.win-amd64-3.9cffi
copying cfficommontypes.py -> buildlib.win-amd64-3.9cffi
copying cfficparser.py -> buildlib.win-amd64-3.9cffi
copying cffierror.py -> buildlib.win-amd64-3.9cffi
copying cffiffiplatform.py -> buildlib.win-amd64-3.9cffi
copying cffilock.py -> buildlib.win-amd64-3.9cffi
copying cffimodel.py -> buildlib.win-amd64-3.9cffi
copying cffipkgconfig.py -> buildlib.win-amd64-3.9cffi
copying cffirecompiler.py -> buildlib.win-amd64-3.9cffi
copying cffisetuptools_ext.py -> buildlib.win-amd64-3.9cffi
....
....
ERROR: Command errored out with exit status 1: 'c:..........venvscriptspython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Binny\AppData\Local\Temp\pip-install-httq50y3\cffi_e5ad43512ad74ac6a994d6368069a3d3\setup.py'"'"'; __file__='"'"'C:\..\..\..\..\Temp\pip-install-httq50y3\cffi_e5ad43512ad74ac6a994d6368069a3d3\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('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:..........pip-record-37a4io_jinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:..........venvincludesitepython3.9cffi' Check the logs for full command output.
Issue
I got the following error while building a docker image by «docker-compose build».
ERROR: Couldn't connect to Docker daemon at http://127.0.0.1:2375 - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Even if I try with «sudo», I got this:
Building web
Step 1/8 : FROM python:3.8.3-alpine
---> 8ecf5a48c789
Step 2/8 : WORKDIR /usr/src/app
---> Using cache
---> 87bb0088a0ba
Step 3/8 : ENV PYTHONDONTWRITEBYTECODE 1
---> Using cache
---> 4f1a6ddf9e1f
Step 4/8 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 5d22b6b7a0f5
Step 5/8 : RUN pip install --upgrade pip
---> Using cache
---> 169ee831f728
Step 6/8 : COPY ./requirements.txt .
---> Using cache
---> 4b4351e31632
Step 7/8 : RUN pip install -r requirements.txt
---> Running in a4dae2fe3761
Collecting asgiref==3.2.10
Downloading asgiref-3.2.10-py3-none-any.whl (19 kB)
Collecting cffi==1.14.3
Downloading cffi-1.14.3.tar.gz (470 kB)
Collecting cryptography==3.2.1
Downloading cryptography-3.2.1.tar.gz (540 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-p3ocmpkd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (128 lines):
Collecting setuptools>=40.6.0
Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cffi!=1.11.3,>=1.8
Using cached cffi-1.14.3.tar.gz (470 kB)
Collecting pycparser
Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-99ngzpxw
cwd: /tmp/pip-install-_eoslhz1/cffi/
Complete output (50 lines):
unable to execute 'gcc': No such file or directory
unable to execute 'gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
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/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pah2aui6/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-p3ocmpkd/overlay --compile --install-headers /tmp/pip-build-env-p3ocmpkd/overlay/include/python3.8/cffi
cwd: /tmp/pip-install-_eoslhz1/cffi/
Complete output (50 lines):
unable to execute 'gcc': No such file or directory
unable to execute 'gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
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/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_eoslhz1/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pah2aui6/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-p3ocmpkd/overlay --compile --install-headers /tmp/pip-build-env-p3ocmpkd/overlay/include/python3.8/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-p3ocmpkd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
That is my Dockerfile:
# pull official base image
FROM python:3.8.3-alpine
# set work directory
WORKDIR /usr/src/app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy project
COPY . .
and docker-compose.yml:
version: '3.7'
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/usr/src/app/
ports:
- 8000:8000
env_file:
- ./.env.dev
I will add that I bought my laptop a few months ago, and already had problems with Docker on my previous system on this device (that’s one of the reasons I changed my system). I switched from Fedora to Ubuntu.
Additionally, there is no «python» alias for python3 in my shell, and because of the unknown reason I need to put «python3 -m» before simple «pip freeze».
I hope that information may be useful.
Thank You.
.
.
.
After adding a «RUN apk add builder-base» in my Dockerfile, following error appears:
Step 8/9 : RUN pip install -r requirements.txt
---> Running in cd9c74fbd831
Collecting asgiref==3.2.10
Downloading asgiref-3.2.10-py3-none-any.whl (19 kB)
Collecting cffi==1.14.3
Downloading cffi-1.14.3.tar.gz (470 kB)
Collecting cryptography==3.2.1
Downloading cryptography-3.2.1.tar.gz (540 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gbfaltlj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (104 lines):
Collecting setuptools>=40.6.0
Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cffi!=1.11.3,>=1.8
Using cached cffi-1.14.3.tar.gz (470 kB)
Collecting pycparser
Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9jsg5veu
cwd: /tmp/pip-install-myhajkmm/cffi/
Complete output (38 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/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-s86a1yn7/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-gbfaltlj/overlay --compile --install-headers /tmp/pip-build-env-gbfaltlj/overlay/include/python3.8/cffi
cwd: /tmp/pip-install-myhajkmm/cffi/
Complete output (38 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/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-myhajkmm/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-s86a1yn7/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-gbfaltlj/overlay --compile --install-headers /tmp/pip-build-env-gbfaltlj/overlay/include/python3.8/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gbfaltlj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Solution
Alpine Linux does not support the binary wheels Python packages ship under the manylinux
tag, so you have to compile things like cffi
and cryptography
yourself. To do so you’ll need a compiler and the correct set of headers. This is documented in the cryptography
installation documentation for Alpine.
Update September 2021: There is now a musllinux
standard which allows binary wheels that work with Alpine. To use them you must have pip
21.2.4 or greater.
Answered By — Paul Kehrer
ОГЛАВЛЕНИЕ:Cтатья 1 (установка)
Cтатья 2 (базовая настройка)
Cтатья 3 (добавляем устройства)
Cтатья 4 (интеграция с HomeKit)
Статья 5 (автоматизации)
Статья 6 (GUI)Статья 7 (Z-Wave)Статья 8 (MQTT)Статья 9 (HTTPS, SSL)
UPD 28.06.2019
На данный момент я ушел с этого пути и использую установку HA в Docker. Мой готовый образ для Raspberry PI3b/3b можно найти тут. Мой актуальный конфиг HA тут.
Сегодня начнем небольшой (а может быть и большой) курс статей по знакомству с Home Assistant. Это еще одна система управления умным домом, свежая, гибкая кроссплатформенная. Для простоты дальнейшего повествования буду называть его HA. Есть 4 пути заиметь сию систему на своем устройстве. Речь дальне пойдет про малинку, но забегая вперед, могу сказать, что установить его можно практически на любое устройство с Unix-like системой. Итак у нас есть 4 варианта из которых я на данный момент буду говорить об одном.1. Развертывание готового образа Hass.io на флешку2. Установка в виртуальное окружение питона3. Установка в Docker4. Развертывание Raspbian с установленным HA на флешкуЯ для себя выбрал второй вариант как более простой, понятный, а так же дающий более подробные знания о том что мы делаем.Для начала нам нужна малинка с установленной Raspbian. Подойдет любая, даже та которая сейчас используется. Статьи по её установке можно найти например тут и тут. Подключаемся к малинке по ssh и обновляем систему до актуального состояния:
sudo apt-get update
sudo apt-get upgrade -y
После того как процесс удачно завершится, необходимо установить дополнительные пакеты, необходимые для дальнейшей работы:
sudo apt-get install python3 python3-venv python3-pip
Далее добавляем нового пользователя для запуска и работы с HA, с его домашней директорией, где будут храниться конфиги:
sudo useradd -rm homeassistant -G dialout,gpio
Этой же командой мы добавили нового пользователя в группы dialout и gpio для управления интерфейсами самой малины. Далее создадим директорию для установки HA и назначим хозяина директории:
cd /srv
sudo mkdir homeassistant
sudo chown homeassistant:homeassistant homeassistant
После этого создадим виртуальную машину от нашего нового пользователя homeassistant:
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
python3 -m pip install wheel
Первоначальные приготовления на этом закончены. можно ставить HA. Проделываем это следующей командой:
pip3 install homeassistant
После ввода команды ждем от 5 до 25 минут в зависимости от скорости вашей флешки, пока все это добро установится. Теперь запускаем наш HA первый раз для создания первоначальных каталогов и конфигов:
Ждем еще минут 10 минимум, пока скачаются необходимые файлы, после этого останавливаем HA комбинацией ctrl c. Выходим из под шелла пользователя homeassistant командой exit. После необходимо создать сервис, который будет запускать HA при перезагрузки малинки. Создадим для этого файл сервиса:
sudo nano /etc/systemd/system/homeassistant@homeassistant.service
Вставляем в него следующий текст и сохраняем файл:
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=%i
ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
[Install]
WantedBy=multi-user.target
Далее надо активировать наш сервис в системе и запустить его:
sudo systemctl --system daemon-reload
sudo systemctl enable homeassistant@homeassistant.service
sudo systemctl start homeassistant@homeassistant.service
Если вы все сделали правильно, через небольшой промежуток времени вы сможете увидеть свой свежеустановленный в браузере. Для этого необходимо перейти по ссылке http://ip.малинки:8123 и откроется что-то похожее на это:
Как видите это долго, но совсем не сложно! В дальнейшем для обновления HA необходимо подключиться к малине по ssh и выполнить следующие три команды:
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
На этом мы заканчиваем первоначальную установку и настройку и увидимся с вами в следующих статьях!
-
rebeltaz
- Posts: 27
- Joined: Sat Dec 20, 2014 1:23 am
pysftp install fails
I have tried installing pysftp using [sudo pip install pysftp] but it keeps failing.
Code: Select all
Using cached https://files.pythonhosted.org/packages/36/60/45f30390a38b1f92e0a8cf4de178cd7c2bc3f874c85430e40ccf99df8fe7/pysftp-0.2.9.tar.gz
Collecting paramiko>=1.17 (from pysftp)
Using cached https://files.pythonhosted.org/packages/4b/80/74dace9e48b0ef923633dfb5e48798f58a168e4734bca8ecfaf839ba051a/paramiko-2.6.0-py2.py3-none-any.whl
Collecting bcrypt>=3.1.3 (from paramiko>=1.17->pysftp)
Using cached https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz
Installing build dependencies ... error
Complete output from command /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip-19.0.3-py2.7.egg/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-jDUN8o/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.1; python_implementation != 'PyPy'":
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting setuptools>=40.8.0
Using cached https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/bb/10/44230dd6bf3563b8f227dbf344c908d412ad2ff48066476672f3a72e174e/wheel-0.33.4-py2.py3-none-any.whl
Collecting cffi>=1.1
Using cached https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
Collecting pycparser (from cffi>=1.1)
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status 'done'
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ptOppe/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1wrlnF/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-jDUN8o/overlay --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/cffi
copying cffi/__init__.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/verifier.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/model.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/error.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/recompiler.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/cparser.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/commontypes.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/lock.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/api.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-armv6l-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-armv6l-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-armv6l-2.7/cffi
copying cffi/_embedding.h -> build/lib.linux-armv6l-2.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-armv6l-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv6l-2.7
creating build/temp.linux-armv6l-2.7/c
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-armv6l-2.7/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ptOppe/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1wrlnF/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-jDUN8o/overlay --compile" failed with error code 1 in /tmp/pip-install-ptOppe/cffi/
----------------------------------------
Command "/usr/bin/python /usr/local/lib/python2.7/dist-packages/pip-19.0.3-py2.7.egg/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-jDUN8o/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.1; python_implementation != 'PyPy'"" failed with error code 1 in None
I have no clue what file it is saying is missing, so if anyone could help me out here… I would really appreciate it!
Derek Tombrello
www.RobotsAndComputers.com
-
MrYsLab
- Posts: 449
- Joined: Mon Dec 15, 2014 7:14 pm
- Location: Noo Joysey, USA
Re: pysftp install fails
Thu Jul 11, 2019 2:00 pm
The error is caused because the compile can’t find Python.h.
To install Python .h, type:
If you decide to move to Python3, the command would be:
-
rebeltaz
- Posts: 27
- Joined: Sat Dec 20, 2014 1:23 am
Re: pysftp install fails
Thu Jul 11, 2019 5:09 pm
Thank you. I did try that last night before posting this, but for some reason that install failed. It worked this morning and I am sitting here waiting for pysftp to compile. It’s gone much further than before so… Here’s hoping
Thanks again.
Derek Tombrello
www.RobotsAndComputers.com
Return to “Python”