I was trying to access the CPU, Ram and storage details of the EdgeGateway hence wanted to use python and psutil to get the job done
When Trying to install psutil in azure edge python module getting bellow error while building. How I can use psuitl here, I want to measure CPU and Ram details of edge gateway.
tep 4/6 : RUN pip install -r requirements.txt
---> Running in d65864318578
Collecting azure-iot-device~=2.0.0
Downloading azure_iot_device-2.0.1-py2.py3-none-any.whl (271 kB)
Collecting psutil
Downloading psutil-5.7.3.tar.gz (465 kB)
Collecting six<2.0.0,>=1.12.0
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting requests<3.0.0,>=2.20.0
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting requests-unixsocket<1.0.0,>=0.1.5
Downloading requests_unixsocket-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting janus<1.0.0,>=0.4.0; python_version >= "3.5"
Downloading janus-0.6.1-py3-none-any.whl (11 kB)
Collecting transitions<1.0.0,>=0.6.8
Downloading transitions-0.8.4-py2.py3-none-any.whl (77 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>1.21.1; python_version != "3.4"
Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting paho-mqtt<2.0.0,>=1.4.0
Downloading paho-mqtt-1.5.1.tar.gz (101 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: psutil, paho-mqtt
Building wheel for psutil (setup.py): started
Building wheel for psutil (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-rde7gv_j/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rde7gv_j/psutil/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-x3f7r1fq
cwd: /tmp/pip-install-rde7gv_j/psutil/
Complete output (44 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.7/psutil
creating build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.7/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=573 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
unable to execute 'gcc': No such file or directory
C compiler or Python headers are not installed on this system. Try to run:
sudo apt-get install gcc python3-dev
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psutil
Running setup.py clean for psutil
Building wheel for paho-mqtt (setup.py): started
Building wheel for paho-mqtt (setup.py): finished with status 'done'
Created wheel for paho-mqtt: filename=paho_mqtt-1.5.1-py3-none-any.whl size=61543 sha256=f27a76a9f3b030cdc789284e823441f35b5deb9b4f021f0bad8d8cbc0c324b53
Stored in directory: /root/.cache/pip/wheels/c9/be/2a/883db47312c70ef7ffcaff281f3294e3075f62da075474d4bb
Successfully built paho-mqtt
Failed to build psutil
Installing collected packages: six, certifi, chardet, urllib3, idna, requests, requests-unixsocket, janus, transitions, paho-mqtt, azure-iot-device, psutil
Running setup.py install for psutil: started
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-rde7gv_j/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rde7gv_j/psutil/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-ygf_yh8g/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/psutil
cwd: /tmp/pip-install-rde7gv_j/psutil/
Complete output (44 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.7/psutil
creating build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.7/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=573 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
unable to execute 'gcc': No such file or directory
C compiler or Python headers are not installed on this system. Try to run:
sudo apt-get install gcc python3-dev
error: command 'gcc' failed with exit status 1
----------------------------------------
Running setup.py install for psutil: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rde7gv_j/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rde7gv_j/psutil/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-ygf_yh8g/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/psutil Check the logs for full command output.
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Related
I use Cygwin terminal on Win7 OS. You can see my python3 and pip3 versions below.
(env)
user ~/env
$ python3 --version
Python 3.9.10
(env)
user ~/env
$ pip3 --version
pip 21.3.1 from /home/user/env/lib/python3.9/site-packages/pip (python 3.9)
I was trying to install flask addons and when I hit
pip3 install flask flask-sqlalchemy
It gives the result below. Could you please name the problem? Also please know that I'm working in a virtual environment.
$ pip3 install flask flask-sqlalchemy
Requirement already satisfied: flask in ./lib/python3.9/site-packages (2.0.2)
Collecting flask-sqlalchemy
Using cached Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: click>=7.1.2 in ./lib/python3.9/site-packages (from flask) (8.0.3)
Requirement already satisfied: itsdangerous>=2.0 in ./lib/python3.9/site-packages (from flask) (2.0.1)
Requirement already satisfied: Werkzeug>=2.0 in ./lib/python3.9/site-packages (from flask) (2.0.2)
Requirement already satisfied: Jinja2>=3.0 in ./lib/python3.9/site-packages (from flask) (3.0.3)
Collecting SQLAlchemy>=0.8.0
Using cached SQLAlchemy-1.4.31-cp39-cp39-cygwin_3_3_3_x86_64.whl
Requirement already satisfied: MarkupSafe>=2.0 in ./lib/python3.9/site-packages (from Jinja2>=3.0->flask) (2.0.1)
Collecting greenlet!=0.4.17
Using cached greenlet-1.1.2.tar.gz (91 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/user/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2zv1me05
cwd: /tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/
Complete output (71 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.cygwin-3.3.3-x86_64-3.9
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_contextvars.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_cpp.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_extension_interface.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_gc.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_generator.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_generator_nested.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_greenlet.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_leaks.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_stack_saved.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_throw.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_tracing.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_version.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_weakref.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
running egg_info
no previously-included directories found matching 'docs/_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
copying src/greenlet/greenlet.c -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/greenlet.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/slp_platformselect.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_mips_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_s390_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x32_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x86_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/tests/_test_extension.c -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
running build_ext
creating build/temp.cygwin-3.3.3-x86_64-3.9
creating build/temp.cygwin-3.3.3-x86_64-3.9/src
creating build/temp.cygwin-3.3.3-x86_64-3.9/src/greenlet
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/user/env/include -I/usr/include/python3.9 -c src/greenlet/greenlet.c -o build/temp.cygwin-3.3.3-x86_64-3.9/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet.c:11:
src/greenlet/greenlet.h:8:10: fatal error: Python.h: No such file or directory
8 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for greenlet
Running setup.py clean for greenlet
Failed to build greenlet
Installing collected packages: greenlet, SQLAlchemy, flask-sqlalchemy
Running setup.py install for greenlet ... error
ERROR: Command errored out with exit status 1:
command: /home/user/env/bin/python/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fgk4qhlk/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/env/include/site/python3.9/greenlet
cwd: /tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/
Complete output (73 lines):
running install
/home/user/env/bin/python/env/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.cygwin-3.3.3-x86_64-3.9
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_contextvars.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_cpp.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_extension_interface.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_gc.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_generator.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_generator_nested.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_greenlet.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_leaks.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_stack_saved.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_throw.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_tracing.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_version.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/test_weakref.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
running egg_info
no previously-included directories found matching 'docs/_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
copying src/greenlet/greenlet.c -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/greenlet.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
copying src/greenlet/slp_platformselect.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet
creating build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_mips_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_s390_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x32_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/platform/switch_x86_unix.h -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/platform
copying src/greenlet/tests/_test_extension.c -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.cygwin-3.3.3-x86_64-3.9/greenlet/tests
running build_ext
creating build/temp.cygwin-3.3.3-x86_64-3.9
creating build/temp.cygwin-3.3.3-x86_64-3.9/src
creating build/temp.cygwin-3.3.3-x86_64-3.9/src/greenlet
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/user/env/include -I/usr/include/python3.9 -c src/greenlet/greenlet.c -o build/temp.cygwin-3.3.3-x86_64-3.9/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet.c:11:
src/greenlet/greenlet.h:8:10: fatal error: Python.h: No such file or directory
8 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/user/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2ej14c7c/greenlet_611bde6e44b84ce894d7dff8b18c2a96/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fgk4qhlk/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/env/include/site/python3.9/greenlet Check the logs for full command output.
This question already has an answer here:
Error on "pip install -U channels" command using for otree (Running setup.py bdist_wheel for twisted ... error)
(1 answer)
Closed 1 year ago.
while trying to do
pip install web3
I am always getting the following error
Building wheel for cytoolz (setup.py) ... error ERROR: Command
errored out with exit status 1: command:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -u -c
'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'/private/var/folders/gb/5fvn1z1s689bzt7vbll5845c0000gn/T/pip-install-cxwpjegv/cytoolz_88244d2146254468892c582d0b9e33fa/setup.py'"'"';
file='"'"'/private/var/folders/gb/5fvn1z1s689bzt7vbll5845c0000gn/T/pip-install-cxwpjegv/cytoolz_88244d2146254468892c582d0b9e33fa/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
bdist_wheel -d
/private/var/folders/gb/5fvn1z1s689bzt7vbll5845c0000gn/T/pip-wheel-ljv1jb3k
cwd: /private/var/folders/gb/5fvn1z1s689bzt7vbll5845c0000gn/T/pip-install-cxwpjegv/cytoolz_88244d2146254468892c582d0b9e33fa/
Complete output (56 lines): [1/5] Cythonizing cytoolz/utils.pyx
[2/5] Cythonizing cytoolz/dicttoolz.pyx [3/5] Cythonizing
cytoolz/functoolz.pyx [4/5] Cythonizing cytoolz/itertoolz.pyx
[5/5] Cythonizing cytoolz/recipes.pyx running bdist_wheel running
build running build_py creating build creating
build/lib.macosx-10.9-universal2-3.10 creating
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/compatibility.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/_version.py -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/init.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/_signatures.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz creating
build/lib.macosx-10.9-universal2-3.10/cytoolz/curried copying
cytoolz/curried/operator.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/curried copying
cytoolz/curried/init.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/curried copying
cytoolz/curried/exceptions.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/curried copying
cytoolz/itertoolz.pyx -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/dicttoolz.pyx ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/functoolz.pyx -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/recipes.pyx ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/utils.pyx -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/utils.pxd ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/init.pxd -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/recipes.pxd ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/functoolz.pxd -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/dicttoolz.pxd ->
build/lib.macosx-10.9-universal2-3.10/cytoolz copying
cytoolz/cpython.pxd -> build/lib.macosx-10.9-universal2-3.10/cytoolz
copying cytoolz/itertoolz.pxd ->
build/lib.macosx-10.9-universal2-3.10/cytoolz creating
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_none_safe.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_utils.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_curried.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_compatibility.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_embedded_sigs.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_functoolz.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_inspect_args.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_doctests.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_tlz.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_signatures.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/dev_skip_test.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_recipes.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_docstrings.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_dev_skip_test.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_dicttoolz.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_serialization.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_curried_toolzlike.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests copying
cytoolz/tests/test_itertoolz.py ->
build/lib.macosx-10.9-universal2-3.10/cytoolz/tests running
build_ext creating build/temp.macosx-10.9-universal2-3.10 creating
build/temp.macosx-10.9-universal2-3.10/cytoolz clang
-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10
-c cytoolz/dicttoolz.c -o build/temp.macosx-10.9-universal2-3.10/cytoolz/dicttoolz.o xcrun:
error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun error: command
'/usr/bin/clang' failed with exit code 1
---------------------------------------- ERROR: Failed building wheel for cytoolz
I have tried to update wheel, installing with sudo, and nothing worked so far,
would love for some help,
thanks
Solution was to install xcode tools using
xcode-select --install
Context:
Creating a docker image from miniconda3, and installing additional conda and pip packages using conda create env via the dockerfile.
The below is the error that I am getting:
Pip subprocess error:
ERROR: Complete output from command /opt/conda/envs/newenv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ouoxn_g_/psutil/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-gj0mtsb8 --python-tag cp36:
ERROR: running bdist_wheel
The environment.yml contains conda packages and then the pip dependencies. All conda packages comes in fine, but the first Pip installation fails as above.
The Dockerfile is as below:
FROM continuumio/miniconda3
WORKDIR /.
COPY ./environment.yml ./
RUN conda env create -f ./environment.yml
RUN echo "source activate processenv" > ~/.bashrc
ENV PATH /opt/conda/envs/newenv/bin:$PATH
Full error as below:
Pip subprocess error:
ERROR: Complete output from command /opt/conda/envs/newenv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ouoxn_g_/psutil/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-gj0mtsb8 --python-tag cp36:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -B /opt/conda/envs/newenv/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/opt/conda/envs/processenv/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psutil
ERROR: flair 0.4.4 has requirement urllib3<1.25,>=1.20, but you'll have urllib3 1.25.3 which is incompatible.
ERROR: Complete output from command /opt/conda/envs/newenv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ouoxn_g_/psutil/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-f2xrpwn0/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -B /opt/conda/envs/newenv/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/opt/conda/envs/processenv/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/opt/conda/envs/newenv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ouoxn_g_/psutil/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-f2xrpwn0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ouoxn_g_/psutil/
CondaEnvException: Pip failed
you have a dependency issue as stated in your error:
ERROR: flair 0.4.4 has requirement urllib3<1.25,>=1.20, but you'll have urllib3 1.25.3 which is incompatible.
you could try adding pip install "urllib3==1.24"
i had to get gcc also installed since miniconda3 does not come with that, i guess. so in the dockerfile gave a apt get for gcc and it worked!
I have been trying to install Psutil but consistently facing the following error. I saw that there exist many solutions to this problem using sudo install python3-devel but my server only runs bash commands.
Is there a Bash specific solution / command I could use?
Failed to build psutil
Installing collected packages: psutil
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: /opt/python/3.7.5/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pnv8vynd/psutil/setup.p
y'"'"'; __file__='"'"'/tmp/pip-install-pnv8vynd/psutil/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-4zlijwis/install-record.txt -
-single-version-externally-managed --compile
cwd: /tmp/pip-install-pnv8vynd/psutil/
Complete output (41 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.7/psutil
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.7/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.7/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_LINUX=1 -DPS
UTIL_ETHTOOL_MISSING_TYPES=1 -I/opt/python/3.7.5/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_commo
n.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
ERROR: Command errored out with exit status 1: /opt/python/3.7.5/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pi
p-install-pnv8vynd/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pnv8vynd/psutil/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-rec
ord-4zlijwis/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
See if you can run this:
#!/bin/bash/
apt-get update # To get the latest package lists
sudo apt-get install gcc python3-dev
apt-get install psutil -y
I have a virtualenv named dev and I am trying to install the required dependencies. During that, I am getting the following error at mysqlclient when I am trying to install using pip install -r requirements.txt which has the requirements:
This is the Error Log for the command which I am running:
Collecting slack-log-handler==0.2.2 (from -r requirements.txt (line 16))
Collecting SQLAlchemy==1.0.15 (from -r requirements.txt (line 17))
Requirement already satisfied: Werkzeug==0.11.11 in /Users/bharathv/Desktop/Work/Customer_API/dev/lib/python2.7/site-packages (from -r requirements.txt (line 18)) (0.11.11)
Collecting pendulum==2.0.4 (from -r requirements.txt (line 19))
Collecting typing<4.0,>=3.6; python_version < "3.5" (from pendulum==2.0.4->-r requirements.txt (line 19))
Using cached https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl
Collecting pytzdata>=2018.3 (from pendulum==2.0.4->-r requirements.txt (line 19))
Using cached https://files.pythonhosted.org/packages/89/02/a3a1cef5074c28157df63846d05aa893f007a92f6bafec0d61cae36bf69d/pytzdata-2018.9-py2.py3-none-any.whl
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
Complete output from command /Users/bharathv/Desktop/Work/Customer_API/dev/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-install-pemYYE/mysqlclient/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 /private/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-wheel-P7vfx2 --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.14-x86_64-2.7
creating build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.14-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,3,7,'final',1) -D__version__=1.3.7 -I/usr/local/Cellar/mysql/8.0.15/include/mysql -I/usr/local/Cellar/python#2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.14-x86_64-2.7/_mysql.o
_mysql.c:29:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient, Flask-MySQLdb, pytz, Flask-RESTful, mysql, requests, slack-log-handler, SQLAlchemy, typing, pytzdata, pendulum
Running setup.py install for mysqlclient ... error
Complete output from command /Users/bharathv/Desktop/Work/Customer_API/dev/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-install-pemYYE/mysqlclient/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/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-record-y_LFeb/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bharathv/Desktop/Work/Customer_API/dev/bin/../include/site/python2.7/mysqlclient:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.14-x86_64-2.7
creating build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.14-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,3,7,'final',1) -D__version__=1.3.7 -I/usr/local/Cellar/mysql/8.0.15/include/mysql -I/usr/local/Cellar/python#2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.14-x86_64-2.7/_mysql.o
_mysql.c:29:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/Users/bharathv/Desktop/Work/Customer_API/dev/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-install-pemYYE/mysqlclient/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/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-record-y_LFeb/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bharathv/Desktop/Work/Customer_API/dev/bin/../include/site/python2.7/mysqlclient" failed with error code 1 in /private/var/folders/dc/dqq29fh52nq9nppk0rd0kdg40000gp/T/pip-install-pemYYE/mysqlclient/
Any help would be greatly appreciated.
Regards,
Bharath
MySQLdb package is a wrapper of mysql C API. so it depends on OS package. and it is out of virtualenv scope.
so you need to install proper mysql package from your os package manager.
or you can avoid this error by using pure python connector like pymysql