PixarAnimationStudios / OpenUSD

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

Installing OpenUSD-24.03 on windows #3026

Open iije opened 1 month ago

iije commented 1 month ago

Description of Issue

Trying to install OpenUSD-24.03.zip on windows unsuccessful.

Error message below:

File "build_usd.py", line 905 b2_settings.append(f"define=BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT=0") ^ SyntaxError: invalid syntax

Steps to Reproduce

  1. unzip OpenUSD-24.03.zip to D:\
  2. 'cd' to where the build_usd.py files is.
  3. run 'python build_usd.py "C:\path\to\my_usd_install_dir"'

System Information (OS, Hardware)

Windows 10

Package Versions

Build Flags

meshula commented 1 month ago

Do you know what version of python you have? I expect python 3.9 and 3.10 to not exhibit this problem. I'm guessing the syntax error comes from one of two things.

1) you are using something older than 3.6 when f-strings were introduced? 2) you are using something very new where an f-string with no arguments is a syntax error? (An f-string should have a braced var {var} to indicate a substitution.

As a workaround, can you try removing the f before the first quotation mark?

jesschimein commented 1 month ago

Filed as internal issue #USD-9505

iije commented 1 month ago

Thanks meshula. so I installed Python 3.11.9 but still run into other issue like "USD-4727"

C:\Program Files\Microsoft Visual Studio\2022\Community> ERROR: C++ compiler not found -- please install a compiler

Is there an easier way to run the "usdcat"? I just want to convert usd files into usda.

dgovil commented 1 month ago

The fastest way would perhaps be to install the NVIDIA prebuilt versions https://developer.nvidia.com/usd#libraries-and-tools if you don't mind not having the latest USD versions.

Otherwise the error suggests that USD cannot find your compiler in your current terminal. It tries to find the executable cl. Can you try and see if cl is available as a command in your terminal? Otherwise you may want to launch a developer terminal to execute the build script. Tips are here https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170

mati-nvidia commented 1 month ago

We targeting to add both 24.03 and 24.05 prebuilt binaries next week if everything stays on track with the RC.