Bug #24797
closed
FindCython.cmake fails to find /usr/bin/cython on openSUSE Leap 15 (py3-only)
Added by Nathan Cutler almost 6 years ago.
Updated over 3 years ago.
Description
Environment: openSUSE Leap 15.0, Python 3 only (Python 2 not present)
Symptom: cmake fails with:
CMake Error at cmake/modules/FindCython.cmake:24 (MESSAGE):
Could not find cython3. Please install Cython.
Call Stack (most recent call first):
src/pybind/CMakeLists.txt:23 (find_package)
The python3-Cython package is installed (it provides /usr/bin/cython, but not /usr/bin/cython3).
- Status changed from New to Can't reproduce
This issue shows up when searching in Google for this cmake error:
For future reference: I had the same error on Ubuntu bionic. Changing -DWITH_PYTHON3=on
to -DWITH_PYTHON3=3
Fixed this error for me.
Edit cmake/modules/FindCython.cmake
Replace
COMMAND ${Python${PYTHON_VERSION}_EXECUTABLE} -m cython --version
with:
COMMAND /usr/bin/python3 -m cython --version
for me what worked is to change ceph.spec file
changing:
-DWITH_PYTHON3=ON \
to
-DWITH_PYTHON3=OFF \
if want to use DWITH_PYTHON3 as ON
then it is required to :
yum install python36-Cython
and turn it back ON
assuming you are having : python3.6 installed
and then when running rpm build run it like this
rpmbuild -bb rpmbuild/SPECS/ceph.spec --define 'python3_pkgversion 36'
Sebastian Wagner wrote:
This issue shows up when searching in Google for this cmake error:
For future reference: I had the same error on Ubuntu bionic. Changing -DWITH_PYTHON3=on
to -DWITH_PYTHON3=3
Fixed this error for me.
ty, do work with this.
Also available in: Atom
PDF