PixarAnimationStudios / OpenUSD

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

Can't run build_usd.py on OpenSuse TW. #839

Closed andreagen0r closed 4 years ago

andreagen0r commented 5 years ago

Description of Issue

I don't know exactly what's happened, but I can't run build_usd.py because I get an error with Pyside. I'm using OpenSuse TW and I think some library versions are too old, like Boost. Is some update coming?

There are a way to just using cmake and github submodules?

Pyside2 install and works fine, but the script fails too.

Steps to Reproduce

  1. git clone https://github.com/PixarAnimationStudios/USD
  2. sudo zypper in tbb
  3. pip install Pyside2 (I try "python -m pip install Pyside" too, but get some error)
  4. python USD/build_scripts/build_usd.py /usr/local/USD

System Information (OS, Hardware)

OpenSuse Tumbleweed Kernel 5.0.9-1 Qt Version: 5.12.3 KDE Plasma: 5.15.4 Intel i7 6700k - 16GB ram, Nvidia GPU

$ python USD/build_scripts/build_usd.py /usr/local/USD

Building with settings:
  USD source directory          /home/andreagenor/code/testesEBesteiras/USD
  USD install directory         /usr/local/USD
  3rd-party source directory    /usr/local/USD/src
  3rd-party install directory   /usr/local/USD
  Build directory               /usr/local/USD/build
  CMake generator               Default
  Downloader                    curl

  Building                      Shared libraries
    Config                      Release
    Imaging                     On
      Ptex support:             Off
      OpenImageIO support:      Off 
      OpenColorIO support:      Off 
    UsdImaging                  On
      usdview:                  On
    Python support              On
    Documentation               Off
    Tests                       Off
    Alembic Plugin              Off
      HDF5 support:             Off
    MaterialX Plugin            Off
    Maya Plugin                 Off
    Katana Plugin               Off
    Houdini Plugin              Off

  Dependencies                  boost, TBB, OpenEXR, GLEW, OpenSubdiv, PySide
PySide is not installed. If you have pip installed, run "pip install PySide" to install it, then re-run this script.
If PySide is already installed, you may need to update your PYTHONPATH to indicate where it is located.

My PYTHONPATH

$ echo $PYTHONPATH
:/usr/lib64/python3.7/site-packages:/usr/lib/python3.7/site-packages:/usr/lib64/python3.7/site-packages:/usr/lib/python3.7/site-packages
$ sudo python -m pip install Pyside                          
[sudo] password for root: 
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting Pyside
  Using cached https://files.pythonhosted.org/packages/36/ac/ca31db6f2225844d37a41b10615c3d371587677efd074db29855e7035de6/PySide-1.2.4.tar.gz
Installing collected packages: Pyside
  Running setup.py install for Pyside ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-OE4ZBz/Pyside/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Rr8DEt/install-record.txt --single-version-externally-managed --compile:
    Removing /tmp/pip-install-OE4ZBz/Pyside/pyside_package
    running install
    running build
    Python architecture is 64bit
    error: Failed to locate the Python library with /usr/lib64/libpython2.7.so, /usr/lib64/libpython2.7.so.1, /usr/lib64/libpython2.7.a

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-OE4ZBz/Pyside/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Rr8DEt/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-OE4ZBz/Pyside/`
charlesfleche commented 5 years ago

You definitely should not install system wide packages with pip, as it'll mess with the zypper installed package. Before moving forward, I suggest using a virtualenv.

$ virtualenv env
$ source env/bin/activate
$ (env) pip install --upgrade pip setuptools wheel
$ (env) pip install PySide
andreagen0r commented 5 years ago

You definitely should not install system wide packages with pip, as it'll mess with the zypper installed package. Before moving forward, I suggest using a virtualenv.

$ virtualenv env
$ source env/bin/activate
$ (env) pip install --upgrade pip setuptools wheel
$ (env) pip install PySide

Not work!


$ pip install PySide                        
Collecting PySide
Using cached https://files.pythonhosted.org/packages/36/ac/ca31db6f2225844d37a41b10615c3d371587677efd074db29855e7035de6/PySide-1.2.4.tar.gz
Complete output from command python setup.py egg_info:
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-iunoo8pf/PySide/

charlesfleche commented 5 years ago

Seems like you are running an unsupported Python version. What version to you try to setup USD with ?

charlesfleche commented 5 years ago

Ah, you seem to run Python 3.7 You should try again with Python 2.7

andreagen0r commented 5 years ago

Yes, I'm using Python3.7, but If I try to use Python2.7 I can't install Pyside, didn't work. I have Pyside2 installed, is there possible to use it? In the instructions has the option to use Pyside2. Unfortunately, I don't understand python :(

Everything would stay be easier using just cmake

charlesfleche commented 5 years ago

Yes, PySide2 on Python2.7 will work. As far as I know Python 2.7 is the only Python version supported on USD.

Everything would stay be easier using just cmake

USD uses python a lot: some tools like usdview are actually written in Python, using the USD and Qt python wrappers.

Try again with Python2.7 and PySide2 and see how it goes.

jilliene commented 5 years ago

Filed as internal issue #USD-5250

sunyab commented 4 years ago

Thanks @charlesfleche for pointing out the Python 3 issue here! At the time this was posted USD did not support Python 3, but it does now as of USD 20.05.

Closing this out.