Blosc / python-blosc

A Python wrapper for the extremely fast Blosc compression library
https://www.blosc.org/python-blosc/python-blosc.html
Other
350 stars 73 forks source link

pipenv install of blosc==1.9.2 on linux fails with CMake #233

Closed morfys007 closed 3 years ago

morfys007 commented 4 years ago

Hello,

I'm trying to pipenv install blosc 1.9.2 in docker with image python:3.6-slim (debian), but I get the following CMake build error.

Any clues as to what is wrong?


✔ Successfully created virtual environment!
--
361 | Virtualenv location: /root/.local/share/virtualenvs/training-WpeVXuHL
362 | Installing dependencies from Pipfile.lock (eb8e28)…
363 | An error occurred while installing blosc==1.9.2 --hash=sha256:89196a2112035836f027a29835ee247b0c7a45cece4cd9e4b740a1428aa174bf! Will try again.
364 | Installing initially failed dependencies…
365 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 252, in install
366 | [InstallError]:       site_packages=state.site_packages
367 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 2063, in do_install
368 | [InstallError]:       keep_outdated=keep_outdated
369 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1313, in do_init
370 | [InstallError]:       pypi_mirror=pypi_mirror,
371 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 900, in do_install_dependencies
372 | [InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
373 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 796, in batch_install
374 | [InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
375 | [InstallError]:   File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 703, in _cleanup_procs
376 | [InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
377 | [pipenv.exceptions.InstallError]: Looking in indexes: https://artifactory.local.mycompany.net/artifactory/api/pypi/pypi/simple
378 | [pipenv.exceptions.InstallError]: Collecting blosc==1.9.2
379 | [pipenv.exceptions.InstallError]:   Using cached https://artifactory.local.mycompany.net/artifactory/api/pypi/pypi/packages/packages/1c/89/004eeb307ba3f56fca9727f47fbde09f8ae3936a1cb0dd6b7708f846d3fd/blosc-1.9.2.tar.gz (816 kB)
380 | [pipenv.exceptions.InstallError]: Building wheels for collected packages: blosc
381 | [pipenv.exceptions.InstallError]:   Building wheel for blosc (setup.py): started
382 | [pipenv.exceptions.InstallError]:   Building wheel for blosc (setup.py): finished with status 'error'
383 | [pipenv.exceptions.InstallError]:   ERROR: Command errored out with exit status 1:
384 | [pipenv.exceptions.InstallError]:    command: /root/.local/share/virtualenvs/training-WpeVXuHL/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w6fpq8gw/blosc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w6fpq8gw/blosc/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-kbv4_620
385 | [pipenv.exceptions.InstallError]:        cwd: /tmp/pip-install-w6fpq8gw/blosc/
386 | [pipenv.exceptions.InstallError]:   Complete output (9 lines):
387 | [pipenv.exceptions.InstallError]:   Traceback (most recent call last):
388 | [pipenv.exceptions.InstallError]:     File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
389 | [pipenv.exceptions.InstallError]:       cmkr = cmaker.CMaker(cmake_executable)
390 | [pipenv.exceptions.InstallError]:     File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
391 | [pipenv.exceptions.InstallError]:       self.cmake_version = get_cmake_version(self.cmake_executable)
392 | [pipenv.exceptions.InstallError]:     File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
393 | [pipenv.exceptions.InstallError]:       "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
394 | [pipenv.exceptions.InstallError]:
395 | [pipenv.exceptions.InstallError]:   Problem with the CMake installation, aborting build. CMake executable is cmake
396 | [pipenv.exceptions.InstallError]:   ----------------------------------------
397 | [pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for blosc
398 | [pipenv.exceptions.InstallError]:   Running setup.py clean for blosc
399 | [pipenv.exceptions.InstallError]: Failed to build blosc
400 | [pipenv.exceptions.InstallError]: DEPRECATION: Could not build wheels for blosc which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
401 | [pipenv.exceptions.InstallError]: Installing collected packages: blosc
402 | [pipenv.exceptions.InstallError]:     Running setup.py install for blosc: started
403 | [pipenv.exceptions.InstallError]:     Running setup.py install for blosc: finished with status 'error'
404 | [pipenv.exceptions.InstallError]:     ERROR: Command errored out with exit status 1:
405 | [pipenv.exceptions.InstallError]:      command: /root/.local/share/virtualenvs/training-WpeVXuHL/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w6fpq8gw/blosc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w6fpq8gw/blosc/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-4k5rmycq/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/training-WpeVXuHL/include/site/python3.6/blosc
406 | [pipenv.exceptions.InstallError]:          cwd: /tmp/pip-install-w6fpq8gw/blosc/
407 | [pipenv.exceptions.InstallError]:     Complete output (9 lines):
408 | [pipenv.exceptions.InstallError]:     Traceback (most recent call last):
409 | [pipenv.exceptions.InstallError]:       File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
410 | [pipenv.exceptions.InstallError]:         cmkr = cmaker.CMaker(cmake_executable)
411 | [pipenv.exceptions.InstallError]:       File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
412 | [pipenv.exceptions.InstallError]:         self.cmake_version = get_cmake_version(self.cmake_executable)
413 | [pipenv.exceptions.InstallError]:       File "/root/.local/share/virtualenvs/training-WpeVXuHL/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
414 | [pipenv.exceptions.InstallError]:         "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
415 | [pipenv.exceptions.InstallError]:
416 | [pipenv.exceptions.InstallError]:     Problem with the CMake installation, aborting build. CMake executable is cmake
417 | [pipenv.exceptions.InstallError]:     ----------------------------------------
418 | [pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1: /root/.local/share/virtualenvs/training-WpeVXuHL/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w6fpq8gw/blosc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w6fpq8gw/blosc/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-4k5rmycq/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/training-WpeVXuHL/include/site/python3.6/blosc Check the logs for full command output.
419 | ERROR: Couldn't install package: blosc
420 | Package installation failed...
421 | The command '/bin/sh -c pipenv install --deploy' returned a non-zero code: 1
422 | time="2020-09-10T00:14:15Z" level=fatal msg="exit status 1"
morfys007 commented 4 years ago

I found a way to resolve the issue, though I don't understand completely the root cause.

Previously, in my Dockerfile, I had apt-get -y install gcc. I changed that to: apt-get -y install build-essential and installation of blosc worked.

FrancescAlted commented 4 years ago

Yes, that's a good question. Perhaps @thewtex can shed some light on this?

FrancescAlted commented 3 years ago

I suppose the cmake dependency was the issue here, but not 100% not sure. Anyway, closing as you have figured it out.