Bug #24797
closedFindCython.cmake fails to find /usr/bin/cython on openSUSE Leap 15 (py3-only)
0%
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).
Updated by Nathan Cutler almost 6 years ago
- Status changed from New to Can't reproduce
Updated by Sebastian Wagner almost 5 years ago
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.
Updated by Jos Collin over 4 years ago
Edit cmake/modules/FindCython.cmake
Replace
COMMAND ${Python${PYTHON_VERSION}_EXECUTABLE} -m cython --version
with:
COMMAND /usr/bin/python3 -m cython --version
Updated by kobi ginon almost 4 years ago
for me what worked is to change ceph.spec file
changing:
-DWITH_PYTHON3=ON \
to
-DWITH_PYTHON3=OFF \
Updated by kobi ginon almost 4 years ago
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'
Updated by Xu Wang over 3 years ago
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.