python: Python 2.7.15rc1
OS: Linux 6a039c3530c7 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
pip: pip 19.1
tried running: pip install hdbscan
Building wheel for hdbscan (PEP 517): finished with status 'error' β
ERROR: Complete output from command /opt/conda/bin/python /opt/conda/lib/python3.6/site-packages/pip/_vendor/pep517/_β
in_process.py build_wheel /tmp/tmpvwnr9hhz: β
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/hdbscan β
copying hdbscan/prediction.py -> build/lib.linux-x86_64-3.6/hdbscan β
copying hdbscan/robust_single_linkage_.py -> build/lib.linux-x86_64-3.6/hdbscan β
copying hdbscan/__init__.py -> build/lib.linux-x86_64-3.6/hdbscan β
copying hdbscan/validity.py -> build/lib.linux-x86_64-3.6/hdbscan β
copying hdbscan/plots.py -> build/lib.linux-x86_64-3.6/hdbscan β
copying hdbscan/hdbscan_.py -> build/lib.linux-x86_64-3.6/hdbscan β
creating build/lib.linux-x86_64-3.6/hdbscan/tests β
copying hdbscan/tests/test_rsl.py -> build/lib.linux-x86_64-3.6/hdbscan/tests β
copying hdbscan/tests/__init__.py -> build/lib.linux-x86_64-3.6/hdbscan/tests β
copying hdbscan/tests/test_hdbscan.py -> build/lib.linux-x86_64-3.6/hdbscan/tests β
running build_ext β
cythoning hdbscan/_hdbscan_tree.pyx to hdbscan/_hdbscan_tree.c β
building 'hdbscan._hdbscan_tree' extension β
creating build/temp.linux-x86_64-3.6 β
creating build/temp.linux-x86_64-3.6/hdbscan β
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-protβ
otypes -fPIC -I/opt/conda/include/python3.6m -I/tmp/pip-build-env-s09rgxp0/overlay/lib/python3.6/site-packages/numpy/coβ
re/include -c hdbscan/_hdbscan_tree.c -o build/temp.linux-x86_64-3.6/hdbscan/_hdbscan_tree.o β
/tmp/pip-build-env-s09rgxp0/overlay/lib/python3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython diβ
rective 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-rfβ
yrnh0q/hdbscan/hdbscan/_hdbscan_tree.pyx β
tree = Parsing.p_module(s, pxd, full_module_name) β
error: command 'gcc' failed with exit status 1 β
---------------------------------------- β
ERROR: Failed building wheel for hdbscan β
Running setup.py clean for hdbscan β
Failed to build hdbscan β
ERROR: Could not build wheels for hdbscan which use PEP 517 and cannot be installed directly β
The command '/bin/sh -c pip install hdbscan' returned a non-zero code: 1 β
sorry gcc wasn't installed in the container and pip was not reporting the error
Hi,
I got the same error, i didn't understand what's the issue. I do have gcc installed.
Thanks
I'm not sure what your system setup is, but gcc can be installed but if python can't find it (i.e. it isn't on the PATH or something similar) then it can still fail. Do other C or Cython based python packages build successfully?
I am getting the same error in Databricks, they use ubuntu ec2 instances running python 3.5 and pip 19.1.
ERROR: Could not build wheels for hdbscan which use PEP 517 and cannot be installed directly
MacOS Majove, 10.14.3
I would not advise using pip install to install anything in Databricks. I am trying to figure out how to install hdbscan via "Library" which should be the proper way to install.
I am getting the same error in Databricks, they use ubuntu ec2 instances running python 3.5 and pip 19.1.
The issue was with pyhton-dev not installed.
Once you install python-dev tools the package HDBSCAN installed successfully.
command: sudo apt-get install python3.6-dev .
I have this problem with PEP517 installing pupil-detectors. Do you know how can I solve this problem?
I am having this problem using Windows and Anaconda3. How have you solved this problem having those condtions?
sudo apt-get install python3.7-dev worked for me
Please try installing Microsoft Visual C++ 14.0. It worked for me. Or well, that was missing and after that hdbscan library installed quickly
If you are using anaconda/miniconda, you can use conda install -c conda-forge hdbscan
- it worked for me (I was installing it in a Docker container).
sudo apt-get install python3.7-dev worked for me
I tried installing python dev tools still it is not able to build wheels
OS: Fedora 30
Python 3.7
conda install -c conda-forge hdbscan
For Anaconda users.
When installing hdbscan
using a Dockerfile
you cannot use python:3.7-slim-stretch
or python:3.7-alpine
but FROM python3.7
works:
FROM python:3.7
#FROM python:3.7.7-slim-stretch --- does NOT work with hdbscan (missing gcc or cython or something)
WORKDIR /app
COPY source/requirements.txt ./
RUN set -ex && pip3 install -r requirements.txt
COPY source /app
ENTRYPOINT ["python"]
CMD [ "main.py" ]
Most helpful comment
If you are using anaconda/miniconda, you can use
conda install -c conda-forge hdbscan
- it worked for me (I was installing it in a Docker container).