Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could NOT find Python3: Found unsuitable version "3.10", but required is exact version "3.10.13" (found /buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10 #2975

Open
disini opened this issue Feb 28, 2024 · 2 comments

Comments

@disini
Copy link

disini commented Feb 28, 2024

Description of Issue

Hi,
I'm trying to compile the openmoonray project
https://github.com/dreamworksanimation/openmoonray/
on ubuntu 22.04.3, with Clion 2023.2 IDE,
and I download the USD library release version of 0.23.11,
and there're some issues on the cmake stage:

CMake Error at /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3: Found unsuitable version "3.10", but required is
  exact version "3.10.13" (found
  /buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10,
  )

      Reason given by package: 
          Development: Cannot find the directory "/buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10"
                                                                                                                      Cannot find the library "/buildAgent/work/4946e30737d0d252/_build/target-deps/python/lib/libpython3.10.so"

Call Stack (most recent call first):
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPython/Support.cmake:3766 (find_package_handle_standard_args)
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPython3.cmake:551 (include)
  /media/liusheng/Programs/Programs/libs/usd/0.23.11/linux/pxrConfig.cmake:44 (find_package)
  moonray/hydra/hdMoonray/CMakeLists.txt:42 (find_package)

"
                                                                                                                      Cannot find the library "/buildAgent/work/4946e30737d0d252/_build/target-deps/python/lib/libpython3.10.so"

I've updated the openmmonray and all dependencies code to the latest version, and I checked the lib "libpython3.10.so" mentioned above, it's exactly version 3.10.13,
### but the value that the cmake read out is "3.10", so, where could I modify the numbers to "3.10.13" instead of "3.10" to fix that problem ?
I mean where is the file that indicate the PYTHON VERSION in the USD lib directory?

Or any other better idea to solve this problem?

Thanks so much!

Steps to Reproduce

System Information (OS, Hardware)

ubuntu 22.04.3, intel 6700k + nvidia gtx 1070

Package Versions 0.23.11

Build Flags


CMake Error at /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3: Found unsuitable version "3.10", but required is
  exact version "3.10.13" (found
  /buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10,
  )

      Reason given by package: 
          Development: Cannot find the directory "/buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10"
                                                                                                                      Cannot find the library "/buildAgent/work/4946e30737d0d252/_build/target-deps/python/lib/libpython3.10.so"

Call Stack (most recent call first):
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPython/Support.cmake:3766 (find_package_handle_standard_args)
  /media/liusheng/Programs/Programs/jetbrains/clion/clion-2023.2/ubuntu/bin/cmake/linux/x64/share/cmake-3.26/Modules/FindPython3.cmake:551 (include)
  /media/liusheng/Programs/Programs/libs/usd/0.23.11/linux/pxrConfig.cmake:44 (find_package)
  moonray/hydra/hdMoonray/CMakeLists.txt:42 (find_package)


-- Configuring incomplete, errors occurred!

[Failed to reload]

I searched the files in the USD lib directory and find out this:
/libs/usd/0.23.11/linux/python/include/python3.10/patchlevel.h:



/* Python version identification scheme.

   When the major or minor version changes, the VERSION variable in
   configure.ac must also be changed.

   There is also (independent) API version information in modsupport.h.
*/

/* Values for PY_RELEASE_LEVEL */
#define PY_RELEASE_LEVEL_ALPHA  0xA
#define PY_RELEASE_LEVEL_BETA   0xB
#define PY_RELEASE_LEVEL_GAMMA  0xC     /* For release candidates */
#define PY_RELEASE_LEVEL_FINAL  0xF     /* Serial should be 0 here */
                                        /* Higher for patch releases */

/* Version parsed out into numeric values */
/*--start constants--*/
#define PY_MAJOR_VERSION        3
#define PY_MINOR_VERSION        10
#define PY_MICRO_VERSION        13
#define PY_RELEASE_LEVEL        PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL       0

/* Version as a string */
#define PY_VERSION              "3.10.13"
/*--end constants--*/

/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
   Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
#define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \
                        (PY_MINOR_VERSION << 16) | \
                        (PY_MICRO_VERSION <<  8) | \
                        (PY_RELEASE_LEVEL <<  4) | \
                        (PY_RELEASE_SERIAL << 0))



**### the PY_VERSION is definitely "3.10.13", **

Found unsuitable version "3.10", but required is
  exact version "3.10.13"

### but why cmake indicate that ?

it's weird。。。。

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-9366

@Lumengine
Copy link

We have the same error. basically, what is happening, is that your build comes from a github workflow or something like this ( let's say a server). And it created a pxrConfig.cmake which set python path with host paths. The /buildAgent/work/4946e30737d0d252/_build/target-deps/python/include/python3.10 and at some point the project you try to compile is doing a find_package(pxr) and it's looking at this cmake trying to find this paths.
I don't have a workaround for now if you want to work with this build.
Otherwise, you could build USD on your machine and it will work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants