PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.12k stars 1.22k forks source link

Could NOT find Python3 (missing: Development Development.Embed) (found version "3.10.15") #3401

Open meghbhalerao opened 2 days ago

meghbhalerao commented 2 days ago

Description of Issue

I am facing the following error -

Building with settings:
  USD source directory          /home/mb230/projects/pkgs/OpenUSD
  USD install directory         /home/mb230/projects/pkgs/build_usd
  3rd-party source directory    /home/mb230/projects/pkgs/build_usd/src
  3rd-party install directory   /home/mb230/projects/pkgs/build_usd
  Build directory               /home/mb230/projects/pkgs/build_usd/build
  CMake generator               Default
  CMake toolset                 Default
  Downloader                    built-in

  Building                      Shared libraries
    Variant                     Release
    Target                      
    Imaging                     On
      Ptex support:             Off
      OpenVDB support:          Off
      OpenImageIO support:      Off 
      OpenColorIO support:      Off 
      PRMan support:            Off
    UsdImaging                  On
      usdview:                  On
    MaterialX support           On
    Python support              On
      Python Debug:             Off
      Python docs:              Off
    Documentation               Off
    Tests                       Off
      Mayapy Tests:             Off
      AnimX Tests:              Off
    Examples                    On
    Tutorials                   On
    Tools                       On
    Alembic Plugin              Off
      HDF5 support:             Off
    Draco Plugin                Off

  Dependencies                  None
STATUS: Installing USD...
2024-11-05 16:38
cmake -DCMAKE_INSTALL_PREFIX="/home/mb230/projects/pkgs/build_usd" -DCMAKE_PREFIX_PATH="/home/mb230/projects/pkgs/build_usd" -DCMAKE_BUILD_TYPE=Release    -DPXR_PREFER_SAFETY_OVER_SPEED=ON -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPXR_USE_DEBUG_PYTHON=OFF -DPXR_USE_BOOST_PYTHON=OFF -DPython3_EXECUTABLE="/home/mb230/anaconda3/envs/test/bin/python3" -DPython3_LIBRARY="/home/mb230/anaconda3/envs/test/lib/libpython3.10.a" -DPython3_INCLUDE_DIR="/home/mb230/anaconda3/envs/test/include/python3.10" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_HTML_DOCUMENTATION=OFF -DPXR_BUILD_PYTHON_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=OFF -DPXR_ENABLE_OPENVDB_SUPPORT=OFF -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_PRMAN_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF -DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=OFF -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DPXR_BUILD_MAYAPY_TESTS=OFF -DPXR_BUILD_ANIMX_TESTS=OFF -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True "/home/mb230/projects/pkgs/OpenUSD"
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Embed) (found
  version "3.10.15")

      Reason given by package: 
          Development: Cannot find the library "/home/mb230/anaconda3/envs/test/lib/libpython3.10.a"

Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  cmake/defaults/Packages.cmake:47 (find_package)
  cmake/defaults/Packages.cmake:96 (setup_python_package)
  CMakeLists.txt:23 (include)

-- Configuring incomplete, errors occurred!
2024-11-05 16:48
cmake -DCMAKE_INSTALL_PREFIX="/home/mb230/projects/pkgs/build_usd" -DCMAKE_PREFIX_PATH="/home/mb230/projects/pkgs/build_usd" -DCMAKE_BUILD_TYPE=Release    -DPXR_PREFER_SAFETY_OVER_SPEED=ON -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPXR_USE_DEBUG_PYTHON=OFF -DPXR_USE_BOOST_PYTHON=OFF -DPython3_EXECUTABLE="/home/mb230/anaconda3/envs/test/bin/python3" -DPython3_LIBRARY="/home/mb230/anaconda3/envs/test/lib/libpython3.10.a" -DPython3_INCLUDE_DIR="/home/mb230/anaconda3/envs/test/include/python3.10" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_HTML_DOCUMENTATION=OFF -DPXR_BUILD_PYTHON_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=OFF -DPXR_ENABLE_OPENVDB_SUPPORT=OFF -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_PRMAN_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF -DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=OFF -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DPXR_BUILD_MAYAPY_TESTS=OFF -DPXR_BUILD_ANIMX_TESTS=OFF -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True "/home/mb230/projects/pkgs/OpenUSD"
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Embed) (found
  version "3.10.15")

      Reason given by package: 
          Development: Cannot find the library "/home/mb230/anaconda3/envs/test/lib/libpython3.10.a"

Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  cmake/defaults/Packages.cmake:47 (find_package)
  cmake/defaults/Packages.cmake:96 (setup_python_package)
  CMakeLists.txt:23 (include)

-- Configuring incomplete, errors occurred!

ERROR: Failed to run 'cmake -DCMAKE_INSTALL_PREFIX="/home/mb230/projects/pkgs/build_usd" -DCMAKE_PREFIX_PATH="/home/mb230/projects/pkgs/build_usd" -DCMAKE_BUILD_TYPE=Release    -DPXR_PREFER_SAFETY_OVER_SPEED=ON -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPXR_USE_DEBUG_PYTHON=OFF -DPXR_USE_BOOST_PYTHON=OFF -DPython3_EXECUTABLE="/home/mb230/anaconda3/envs/test/bin/python3" -DPython3_LIBRARY="/home/mb230/anaconda3/envs/test/lib/libpython3.10.a" -DPython3_INCLUDE_DIR="/home/mb230/anaconda3/envs/test/include/python3.10" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_HTML_DOCUMENTATION=OFF -DPXR_BUILD_PYTHON_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=OFF -DPXR_ENABLE_OPENVDB_SUPPORT=OFF -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_PRMAN_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF -DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=OFF -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DPXR_BUILD_MAYAPY_TESTS=OFF -DPXR_BUILD_ANIMX_TESTS=OFF -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True "/home/mb230/projects/pkgs/OpenUSD"' in /home/mb230/projects/pkgs/build_usd/build/OpenUSD.
See /home/mb230/projects/pkgs/build_usd/build/OpenUSD/log.txt for more details.

The error log file is (which is almost same as the above error shown on the console, but just attaching that too here in case it is needed) -

2024-11-05 16:38
cmake -DCMAKE_INSTALL_PREFIX="/home/mb230/projects/pkgs/build_usd" -DCMAKE_PREFIX_PATH="/home/mb230/projects/pkgs/build_usd" -DCMAKE_BUILD_TYPE=Release    -DPXR_PREFER_SAFETY_OVER_SPEED=ON -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPXR_USE_DEBUG_PYTHON=OFF -DPXR_USE_BOOST_PYTHON=OFF -DPython3_EXECUTABLE="/home/mb230/anaconda3/envs/test/bin/python3" -DPython3_LIBRARY="/home/mb230/anaconda3/envs/test/lib/libpython3.10.a" -DPython3_INCLUDE_DIR="/home/mb230/anaconda3/envs/test/include/python3.10" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_HTML_DOCUMENTATION=OFF -DPXR_BUILD_PYTHON_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=OFF -DPXR_ENABLE_OPENVDB_SUPPORT=OFF -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_PRMAN_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF -DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=OFF -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DPXR_BUILD_MAYAPY_TESTS=OFF -DPXR_BUILD_ANIMX_TESTS=OFF -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True "/home/mb230/projects/pkgs/OpenUSD"
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Embed) (found
  version "3.10.15")

      Reason given by package: 
          Development: Cannot find the library "/home/mb230/anaconda3/envs/test/lib/libpython3.10.a"

Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  cmake/defaults/Packages.cmake:47 (find_package)
  cmake/defaults/Packages.cmake:96 (setup_python_package)
  CMakeLists.txt:23 (include)

-- Configuring incomplete, errors occurred!
2024-11-05 16:48
cmake -DCMAKE_INSTALL_PREFIX="/home/mb230/projects/pkgs/build_usd" -DCMAKE_PREFIX_PATH="/home/mb230/projects/pkgs/build_usd" -DCMAKE_BUILD_TYPE=Release    -DPXR_PREFER_SAFETY_OVER_SPEED=ON -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPXR_USE_DEBUG_PYTHON=OFF -DPXR_USE_BOOST_PYTHON=OFF -DPython3_EXECUTABLE="/home/mb230/anaconda3/envs/test/bin/python3" -DPython3_LIBRARY="/home/mb230/anaconda3/envs/test/lib/libpython3.10.a" -DPython3_INCLUDE_DIR="/home/mb230/anaconda3/envs/test/include/python3.10" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_HTML_DOCUMENTATION=OFF -DPXR_BUILD_PYTHON_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=OFF -DPXR_ENABLE_OPENVDB_SUPPORT=OFF -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_PRMAN_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF -DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=OFF -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DPXR_BUILD_MAYAPY_TESTS=OFF -DPXR_BUILD_ANIMX_TESTS=OFF -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True "/home/mb230/projects/pkgs/OpenUSD"
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Embed) (found
  version "3.10.15")

      Reason given by package: 
          Development: Cannot find the library "/home/mb230/anaconda3/envs/test/lib/libpython3.10.a"

Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  cmake/defaults/Packages.cmake:47 (find_package)
  cmake/defaults/Packages.cmake:96 (setup_python_package)
  CMakeLists.txt:23 (include)

-- Configuring incomplete, errors occurred!

I check this folder - ls /home/mb230/anaconda3/envs/test/lib/ and. I get the following -

cmake               libformw.so.6      libncurses++.a        libquadmath.so.0.0.0  libuuid.so.1.3.0
itcl4.2.3           libformw.so.6.5    libncurses.so         libreadline.so        libz.so.1
libatomic.so        libgcc_s.so        libncurses.so.6       libreadline.so.8      libz.so.1.3.1
libatomic.so.1      libgcc_s.so.1      libncurses.so.6.5     libreadline.so.8.2    pkgconfig
libatomic.so.1.2.0  libgomp.so         libncurses++w.a       libsqlite3.so         python3.1
libbz2.a            libgomp.so.1       libncursesw.so        libsqlite3.so.0       python3.10
libbz2.so           libgomp.so.1.0.0   libncursesw.so.6      libsqlite3.so.0.8.6   sqlite3.40.0
libbz2.so.1.0       libhistory.so      libncursesw.so.6.5    libssl.so             tcl8
libbz2.so.1.0.8     libhistory.so.8    libnsl.so             libssl.so.3           tcl8.6
libcrypto.so        libhistory.so.8.2  libnsl.so.3           libtcl8.6.so          tclConfig.sh
libcrypto.so.3      libitm.so          libnsl.so.3.0.0       libtclstub8.6.a       tclooConfig.sh
libcrypt.so         libitm.so.1        libpanel.so           libtinfo.so           tdbc1.1.5
libcrypt.so.2       libitm.so.1.0.0    libpanel.so.6         libtinfo.so.6         tdbcmysql1.1.5
libcrypt.so.2.0.0   liblzma.so         libpanel.so.6.5       libtinfo.so.6.5       tdbcodbc1.1.5
libffi.a            liblzma.so.5       libpanelw.so          libtinfow.so          tdbcpostgres1.1.5
libffi.so           liblzma.so.5.2.6   libpanelw.so.6        libtinfow.so.6        terminfo
libffi.so.8         libmenu.so         libpanelw.so.6.5      libtinfow.so.6.5      thread2.8.8
libffi.so.8.1.0     libmenu.so.6       libpython3.10.so      libtk8.6.so           tk8.6
libform.so          libmenu.so.6.5     libpython3.10.so.1.0  libtkstub8.6.a        tkConfig.sh
libform.so.6        libmenuw.so        libpython3.so         libuuid.a
libform.so.6.5      libmenuw.so.6      libquadmath.so        libuuid.so
libformw.so         libmenuw.so.6.5    libquadmath.so.0      libuuid.so.1

Steps to Reproduce

  1. git clone https://github.com/PixarAnimationStudios/OpenUSD
  2. conda create -n test
  3. conda activate test
  4. conda install python==3.10.15
  5. pip install PyOpenGL PyOpenGL_accelerate pyside2 pyside6
  6. python OpenUSD/build_scripts/build_usd.py ./build_usd

System Information (OS, Hardware)

hostnamectl -

Static hostname: xxx
       Icon name: computer-desktop
         Chassis: desktop 🖥️
      Machine ID: xx
         Boot ID: xx
Operating System: Ubuntu 24.04.1 LTS              
          Kernel: Linux 6.8.0-45-generic
    Architecture: x86-64
 Hardware Vendor: Dell Inc.
  Hardware Model: Precision 3680
Firmware Version: 1.6.0
   Firmware Date: xx
    Firmware Age: xx

Package Versions

conda list gives -

# packages in environment at /home/mb230/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
ca-certificates           2024.8.30            hbcca054_0    conda-forge
ld_impl_linux-64          2.43                 h712a8e2_2    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.2.0               h77fa898_1    conda-forge
libgcc-ng                 14.2.0               h69a702a_1    conda-forge
libgomp                   14.2.0               h77fa898_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libsqlite                 3.47.0               hadc24fc_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libzlib                   1.3.1                hb9d3cd8_2    conda-forge
ncurses                   6.5                  he02047a_1    conda-forge
openssl                   3.3.2                hb9d3cd8_0    conda-forge
pip                       24.3.1             pyh8b19718_0    conda-forge
pyopengl-accelerate       3.1.7                    pypi_0    pypi
pyside6                   6.8.0.2                  pypi_0    pypi
pyside6-addons            6.8.0.2                  pypi_0    pypi
pyside6-essentials        6.8.0.2                  pypi_0    pypi
python                    3.10.15         h4a871b0_2_cpython    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                75.3.0             pyhd8ed1ab_0    conda-forge
shiboken6                 6.8.0.2                  pypi_0    pypi
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tzdata                    2024b                hc8b5060_0    conda-forge
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

Build Flags

Have mentioned this above.

could someone help me regarding this?

I see that I do not have the libpython3.10.a and that seems to be the issue that is mentioned. Am I missing something in my conda env or python installation?

Any help would be greatly appreciated, thank you!

-- Megh

s-dakshin commented 2 days ago

I am facing a similar issue trying to build USD with python on windows 10 and it doesn't seem to be finding python.

jesschimein commented 1 day ago

Filed as internal issue #USD-10403

dgovil commented 1 day ago

@s-dakshin are you also using conda and getting the same error? If not, it would be helpful to file a separate issue.

@meghbhalerao can you run the following in the same Python environment and give the output?

import sysconfig
base = sysconfig.get_config_var("installed_base")
multiarch = sysconfig.get_config_var("multiarchsubdir")
library = sysconfig.get_config_var("LDLIBRARY")

print(f"installed_base location is {base} \n multiarchsubdir is {multiarch} \n LDLIBRARY is {library}")
dgovil commented 1 day ago

@sunyab I realized that https://github.com/PixarAnimationStudios/OpenUSD/blob/release/build_scripts/build_usd.py#L225 has an issue that it can fall through on the last item even if it doesn't exist. I'll submit a PR for that. I'm not sure that its the core issue here, but I think it is an issue in general as I was trying to figure out what's going on.

meghbhalerao commented 1 day ago

@meghbhalerao can you run the following in the same Python environment and give the output?

Hi, I get the following output after running the above script -

installed_base location is /home/mb230/anaconda3/envs/test 
 multiarchsubdir is None 
 LDLIBRARY is libpython3.10.a
dgovil commented 1 day ago

Hmm okay, so I think conda is somehow lying about the LDLIBRARY it's using. I'm not sure how that's derived, but it's telling us to use the static library, but you only have the dynamic library. I put up a PR just now that will at least error earlier when it can't find it https://github.com/PixarAnimationStudios/OpenUSD/pull/3404

One short term workaround is that you can pass in the Python paths explicitly by using the --build-python-info argument to the build_usd.py script.

I think it should be this for you but make sure the paths I put below actually exist

--build-python-info /home/mb230/anaconda3/envs/test/bin/python3 /home/mb230/anaconda3/envs/test/lib/libpython3.10.so /home/mb230/anaconda3/envs/test/include/python3.10 3.10.15
s-dakshin commented 1 day ago

@dgovil It is a similar issue but I get the package through vcpkg instead of Conda, created a separate issue here - https://github.com/PixarAnimationStudios/OpenUSD/issues/3405