PixarAnimationStudios / OpenUSD

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

Error compiling USD v20.05 with Python 3.7.4 installed. #1165

Closed ChokmahBinah closed 4 years ago

ChokmahBinah commented 4 years ago

Description of Issue

Hello,

I am trying to compile USD v20.05. I previously checked dependencies ans it seems ok. I installed Python 3.7.4. When compiling USD using command prompt and pyhton building script, I get this error :

ERROR: 'utf-8' codec can't decode byte 0x82 in position 50: invalid start byte

I don't know for now why it happens. (Before I built USD 20.02 with Python 27 only, and i worked fine)

Perhaps I forgot to specify I use Python 3.7.4 now, and I don't know how to do this if so.

I will try to test compoling using python 2.7. But I anyone have any clues, I would be delighted ^^

Thank you in advance :)

Florian.

Steps to Reproduce

System Information (OS, Hardware)

Windows 10.0.18363 Intel(R) Core(TM) -i7-4790 24 Gb ram nVidia GeForce GTX 750 Ti

Package Versions

USD v20.05

Build Flags

python build_usd.py --tests --openvdb --prman --prman-location "C:\Program Files\Pixar\RenderManProServer-23.2" --alembic "C:\Program Files\USD" --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem"

ChokmahBinah commented 4 years ago

Compiling with Python2.7 worked like a charm. Only a tiny problem : Build fails when setting target directory for USD as "C:\Program Files\USD". I had to set target directory as "C:\USD" and it worked.

But when using Python 3.7.4 I still have the same problem as above.

After some researches, perhaps it could be due to my Windows 10 regional settings ?

jilliene commented 4 years ago

Filed as internal issue #USD-5998

sunyab commented 4 years ago

Hi @ChokmahBinah, could you post the logs showing the backtrace from your builds? The Python 3 issue does seem to be related to your locale, what is that set to? In Python you can do the following to check:

import locale
locale.getdefaultlocale()
ChokmahBinah commented 4 years ago

Hello @sunyab and @jilliene ,

I added my System Information in my first message hoping it could help.

And here my locales :

C:\Program Files\Python37>python Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import locale locale.getdefaultlocale() ('fr_FR', 'cp1252')

ChokmahBinah commented 4 years ago

Here the only log I can get : C:\USD-master\build_scripts>python build_usd.py --tests --openvdb --prman --prman-location "C:\Program Files\Pixar\RenderManProServer-23.2" --alembic "C:\USD" --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem"

Building with settings: USD source directory C:\USD-master USD install directory C:\USD 3rd-party source directory C:\USD\src 3rd-party install directory C:\USD Build directory C:\USD\build CMake generator Default Downloader curl

Building Shared libraries Config Release Imaging On Ptex support: Off OpenVDB support: On OpenImageIO support: Off OpenColorIO support: Off PRMan support: On UsdImaging On usdview: On Python support On Python 3: On Documentation Off Tests On Examples On Tutorials On Alembic Plugin On HDF5 support: Off Draco Plugin Off MaterialX Plugin Off

Dependencies zlib, boost, TBB, OpenEXR, Alembic, GLEW, OpenSubdiv, Blosc, OpenVDB Build arguments boost: --with-date_time --with-thread --with-system --with-filesystem STATUS: Installing zlib... ERROR: 'utf-8' codec can't decode byte 0x82 in position 50: invalid start byte

Here is the zlib log I found : log.txt It seems to be ok.

The problems seems to appear at boost installation.

But I really don't, I am pretty new to this kind of stuff =$

ChokmahBinah commented 4 years ago

Hello, I finally manage to compile USD 20.05 with Python 3.7.4.

I used Visual Studio 2017 Developer Command Prompt v15.9.20 as before.

Here is the line I replaced at lines 255/256 in the build_usd.py script :

image

I launched kitchen stage and tit worked like a charm. I lauched the interpreter command to verify that it was really using Python 3.7.4.

I hope it would help.

Thank you a lot for all this USD stuff ^^

ZeroSOFAD commented 4 years ago

I have same problem on Python 3.8.3

import locale locale.getdefaultlocale() ('ru_RU', 'cp1251')

------ERROR----- C:\OpenServer\domains\3d\USD-master\build_scripts>python build_usd.py c:\OpenServer\domains\3d\usd ...

Dependencies zlib, boost, TBB, GLEW, OpenSubdiv STATUS: Installing zlib... ERROR: 'utf-8' codec can't decode byte 0xa2 in position 27: invalid start byte

ChokmahBinah commented 4 years ago

@ZeroSOFAD , Did you trying to modify the build_usd.py script as I mentionned ? I am curious if it could work for anyone else ? ...

ZeroSOFAD commented 4 years ago

@ChokmahBinah Yes, but not worked for me. All dependencies installed success. But when installing USD error occurred.

------ERROR----- STATUS: Installing USD... ERROR: 'charmap' codec can't decode byte 0x98 in position 30480: character maps to

ZeroSOFAD commented 4 years ago

@ChokmahBinah And yet your method works! line 255/256 in the build_usd.py script

------CODE in build_usd.py------------

encoding = sys.stdout.encoding or "UTF-8"

encoding = "Windows-1251" ------CODE in build_usd.py------------

I reinstalled Python and Visual Studio

In the beginning not working with Python 3.8.3 Visual Studio 16 2019

And then installed and working. Python 3.7.4 Visual Studio 14 2015

meshula commented 4 years ago

Python 3.8 isn't supported by USD on Windows yet. I think you might also have success with Python 3.7 and Visual Studio 16 2019.

ZeroSOFAD commented 4 years ago

I tried it like this Python 3.7.4 Visual Studio 16 2019

it doesn’t work!