Failed to build gevent
ERROR: Could not build wheels for gevent which use PEP 517 and cannot be installed directly
Collecting gevent==1.5.0
Using cached gevent-1.5.0.tar.gz (5.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting greenlet>=0.4.14; platform_python_implementation == "CPython"
Using cached greenlet-0.4.15.tar.gz (59 kB)
Building wheels for collected packages: gevent
Building wheel for gevent (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 /usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpzg5h9yc_
cwd: /tmp/pip-install-jikykc6_/gevent
Complete output (340 lines):
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/gevent
copying src/gevent/win32util.py -> build/lib.linux-x86_64-3.6/gevent
...
copying src/gevent/tests/tests_that_dont_do_leakchecks.txt -> build/lib.linux-x86_64-3.6/gevent/tests
copying src/gevent/tests/tests_that_dont_monkeypatch.txt -> build/lib.linux-x86_64-3.6/gevent/tests
copying src/gevent/tests/tests_that_dont_use_resolver.txt -> build/lib.linux-x86_64-3.6/gevent/tests
copying src/gevent/tests/hosts_file.txt -> build/lib.linux-x86_64-3.6/gevent/tests
copying src/gevent/tests/test_server.key -> build/lib.linux-x86_64-3.6/gevent/tests
copying src/gevent/tests/server.key -> build/lib.linux-x86_64-3.6/gevent/tests
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/gevent.libuv._corecffi.c'
creating build/temp.linux-x86_64-3.6
Running '(cd "/tmp/pip-install-jikykc6_/gevent/deps/libev" && sh ./configure -C > configure-output.txt )' in /tmp/pip-install-jikykc6_/gevent
./configure: line 1: /usr/bin/file: not found
config.status: error: in `/tmp/pip-install-jikykc6_/gevent/deps/libev':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 182, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 213, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 198, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 250, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 143, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 436, in <module>
run_setup(EXT_MODULES)
File "setup.py", line 420, in run_setup
"signal_os_incompat = gevent.monkey:_subscribe_signal_os",
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/cffi/setuptools_ext.py", line 141, in run
ext.sources[0] = make_mod(self.build_temp, pre_run)
File "/tmp/pip-build-env-5ltodiko/overlay/lib/python3.6/site-packages/cffi/setuptools_ext.py", line 126, in make_mod
pre_run(ext, ffi)
File "/tmp/pip-install-jikykc6_/gevent/_setuputils.py", line 378, in pre_run
action()
File "/tmp/pip-install-jikykc6_/gevent/_setuplibev.py", line 57, in configure_libev
system(libev_configure_command)
File "/tmp/pip-install-jikykc6_/gevent/_setuputils.py", line 212, in system
if _system(cmd, cwd=cwd, env=env, **kwargs):
File "/tmp/pip-install-jikykc6_/gevent/_setuputils.py", line 208, in _system
return check_call(cmd, cwd=cwd, env=env, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '(cd "/tmp/pip-install-jikykc6_/gevent/deps/libev" && sh ./configure -C > configure-output.txt )' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for gevent
Failed to build gevent
ERROR: Could not build wheels for gevent which use PEP 517 and cannot be installed directly
build docker image
FROM docker:18.06
RUN apk update
RUN apk add --no-cache 'python3==3.6.9-r2'
RUN apk add --no-cache python3-dev libffi-dev gcc musl-dev
RUN mkdir -p .pip
RUN pip3 --cache-dir=.pip install --upgrade pip
then run this image and install gevent in container
pip install gevent==1.5.0
after install make, it builded successfully.
apk add make
HA! thank you so much, just installed gevent on python alpine 3.8, downgraded to 3.7 immediately, stumbled upon this wheel build issue on my intermediate container. luckily you fixed this 2 days ago!
You saved me hours of searching probably聽@Song2017
I now have another problem, my curl to healthcheck page stopped working, not sure if related to the switch to gevent..
after install
make, it builded successfully.
apk add make
It worked for me, too.
Most helpful comment
after install
make, it builded successfully.apk add make