CMake Error at python

745 views
Skip to first unread message

Victor Lavrent'ev

unread,
Dec 22, 2022, 7:57:59 AM12/22/22
to alembic-discussion
Have a nice day, everyone.

I installed a new python (3.11) and now I can't build Alembic (Python 3.10 old version installed in parallel). Is it possible to fix CMakeLists.txt in order to build the library on the old version of Python (3.10)?

-- Found Python3: /usr/local/bin/python3.11 (found version "3.11.0") found components: Interpreter Development Development.Module Development.Embed
-- Found Python 3.11.0
-- Found package Imath using: Imath::PyImath_Python3_11
-- Could NOT find Boost (missing: python311) (found suitable version "1.76.0", minimum required is "1.53.0")
-- Could NOT find Boost (missing: python3.11) (found suitable version "1.76.0", minimum required is "1.53.0")
-- Found Boost: /usr/include (found suitable version "1.76.0", minimum required is "1.53.0")  missing components: python311
-- BOOST INCLUDE DIRS: /usr/include
-- BOOST LIBRARIES:

CMake Error at python/PyAlembic/Tests/CMakeLists.txt:49 (GET_TARGET_PROPERTY):
  get_target_property() called with non-existent target
  "Imath::PyImath_Python3_11".

Nikita Glukhov

unread,
Dec 22, 2022, 8:15:34 AM12/22/22
to alembic-d...@googlegroups.com
Hello Victor.

You need to build the Boost library with the Python 3.11 binding:

https://www.boost.org/doc/libs/1_81_0/tools/build/doc/html/index.html#bbv2.reference.tools.libraries.python

Nikita.

чт, 22 дек. 2022 г. в 15:58, Victor Lavrent'ev <victor.l...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/a732fd33-d49a-4f48-9935-0a8f52d572aen%40googlegroups.com.

Victor Lavrent'ev

unread,
Dec 22, 2022, 8:22:28 AM12/22/22
to alembic-d...@googlegroups.com
Read the question carefully. And go after the ship.

чт, 22 груд. 2022 р. о 15:15 Nikita Glukhov <nikita....@gmail.com> пише:

Victor Lavrent'ev

unread,
Dec 22, 2022, 1:59:35 PM12/22/22
to alembic-discussion
I tried to change the Python version using the methods described in link.

https://stackoverflow.com/questions/15291500/i-have-2-versions-of-python-installed-but-cmake-is-using-older-version-how-do
It did not help, 

cmake -DUSE_PYALEMBIC=ON -DPYTHON_LIBRARY=/lib64/libpython3.10.so.1.0 -DPYTHON_INCLUDE_DIR=/usr/include/python3.10 -DPYTHON_EXECUTABLE=/bin/python3.10 /dev/lib/alembic

-- Found package Imath
CMake Warning at CMakeLists.txt:242 (FIND_PACKAGE):
  By not providing "FindPython3.10.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Python3.10", but CMake did not find one.

  Could not find a package configuration file provided by "Python3.10" with
  any of the following names:

    Python3.10Config.cmake
    python3.10-config.cmake

  Add the installation prefix of "Python3.10" to CMAKE_PREFIX_PATH or set
  "Python3.10_DIR" to a directory containing one of the above files.  If
  "Python3.10" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:249 (MESSAGE):
  Python not found! Skipping PyAlembic



четвер, 22 грудня 2022 р. о 14:57:59 UTC+2 Victor Lavrent'ev пише:

Joan Charmant

unread,
Jan 31, 2023, 6:21:12 AM1/31/23
to alembic-discussion
Changing the FIND_PACKAGE command in the main CMakeLists.txt to force the version of Python worked for me:

FIND_PACKAGE(Python3 3.10 EXACT COMPONENTS Interpreter Development)

Cheers,
Joan.
Reply all
Reply to author
Forward
0 new messages