I'm trying to run a full make
on Buildroot. I added some Python packages as hdbscan. Unfortunately, it seems Buildroot needs Cython to build hbdscan and can't find it, even though it seems to be installed...
here is the error I get after running make
:
<path to buildroot>/output/build/python-hdbscan-0.8.27/setup.py:8: UserWarning : No module named 'Cython'
warnings.warn(e.args[0])
<path to buildroot>/output/build/python-hdbscan-0.8.27/setup.py:92: UserWarning : Due to incompatibilities with Python 3.7 hdbscan nowrequires Cython to be installed in order to built it
warnings.warn("Due to incompatibilities with Python 3.7 hdbscan now")
...
raise ImportError('Cython not fuond ! Please install cython and try again')
ImportError: Cython not fuond ! Please install cython and try again
The setup.py
file it's trying to run does ask to import cython
but it's supposed to be installed already. I tried every command I could see on the forums but nothing will do... As I have several versions of Python installed on my virtual machine, I thought it could be the cause of the problem but I'm not sure about that anymore... I runned a few commands like those :
sudo pip install cython
sudo apt --reinstall install cython
sudo python3.7 -m pip install cython
sudo apt-get install cython
some commands to upgrade cython, pip...
some commands to uninstall cython then install it again...I don't know what to try anymore... Does anyone has an idea what I could do ?
You need cython to be part of the cross-compilation environment, not simply installed on your build machine. Any pip
or apt
you run on your build machine are not going to help.
In Buildroot, it's trivially easy to do this: add a dependency on Cython in the python-hdbscan.mk
file:
PYTHON_HDBSCAN_DEPENDENCIES += python-cython
For completeness, you also need the corresponding dependency in Config.in
:
config BR2_PACKAGE_PYTHON_HDBSCAN
...
select BR2_PACKAGE_PYTHON_CYTHON
...