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

Build fails - UIC not found. #2582

Closed
sean-reed opened this issue Aug 9, 2023 · 16 comments
Closed

Build fails - UIC not found. #2582

sean-reed opened this issue Aug 9, 2023 · 16 comments

Comments

@sean-reed
Copy link

sean-reed commented Aug 9, 2023

Description of Issue

Install fails with:

ERROR: uic not found -- please install PySide2 or PySide6 and adjust your PATH. (Note that this program may be named pyside2-uic or pyside6-uic depending on your platform)

PySide6 was installed with pip install pyside6. The command pyside6-uic -h prints "Qt User Interface Compiler version 6.5.2" so it seems that uic is installed correctly.

Steps to Reproduce

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

System Information (OS, Hardware)

Linux Mint

@sean-reed sean-reed changed the title Install fails - UIC not found. Build fails - UIC not found. Aug 9, 2023
@jesschimein
Copy link

Filed as internal issue #USD-8576

@martinni
Copy link

Reproduced on the following environments:

  • Linux Debian
  • MacOS Ventura (Intel)

@maxwacker
Copy link

maxwacker commented Aug 19, 2023

Found a work around by downgrading pyside version :
pip3 install pyside6==6.5.1.1 --ignore-installed

@johhnry
Copy link

johhnry commented Aug 25, 2023

Same issue here on Gentoo and dev-qt/qtwidgets-5.15.10-r2 installed:

$ uic -h    
Usage: uic [options] [uifile]
Qt User Interface Compiler version 5.15.10
...

$ python build_scripts/build_usd.py /usr/local/USD
ERROR: uic not found -- please install PySide2 or PySide6 and adjust your PATH. (Note that this program may be named pyside2-uic or pyside6-uic depending on your platform)

EDIT: I just saw that the executable names that are checked are pyside6-uic and pyside2-uic, should it also check for uic too?

@meshula
Copy link
Member

meshula commented Sep 28, 2023

@martinni when you say you reproduced on MacOS Ventura (Intel), how did you reproduce it, and what symptoms did you see? I just went through the exercise of starting fresh, installing the following:

❯ pip3 list installed
Package            Version
------------------ -------
Jinja2             3.1.2
MarkupSafe         2.1.3
pip                23.2.1
PyOpenGL           3.1.7
PySide6            6.5.2
PySide6-Addons     6.5.2
PySide6-Essentials 6.5.2
setuptools         68.2.2
shiboken6          6.5.2
wheel              0.41.2

ran the build using build_usd.py, and got the expected response.

STATUS: Installing USD...

Success! To use USD, please ensure that you have:
...

Furthermore,

 /var/tmp ··································································································································································································· usd-x64-py310 
❯ pyside6-uic --version
uic 6.5.2


❯ uic --version
zsh: command not found: uic

So I don't think we should be looking for uic, at least on a mac.

@meshula
Copy link
Member

meshula commented Sep 29, 2023

Update, on Mac. I managed to repro by finding all pyside6-uic on my system and removing them, then reinstalling PySide6 with pip.

  WARNING: The scripts pyside6-assistant, pyside6-deploy, pyside6-designer, pyside6-genpyi, pyside6-linguist, pyside6-lrelease, pyside6-lupdate, pyside6-metaobjectdump, pyside6-project, pyside6-qml, pyside6-qmlcachegen, pyside6-qmlformat, pyside6-qmlimportscanner, pyside6-qmllint, pyside6-qmlls, pyside6-qmltyperegistrar, pyside6-qtpy2cpp, pyside6-rcc and pyside6-uic are installed in '/Users/nporcino/Library/Python/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Previously, pyside6-uic had been on my system in /usr/local/bin which gave me the illusion everything was fine.

pip printed the above warning which is indeed correct. So the solution seems to be as pip instructs, adding the special location indicated to PATH. I wonder if pyside6-uic does exist on your systems, just not where it used to be?

@meshula
Copy link
Member

meshula commented Oct 3, 2023

Please note that searching for uic specifically was removed in this commit: 96d27d5

because there may be more than one tool named uic and it's not possible to tell them apart; whereas the longer named pyside6-uic are unambiguous.

Hopefully the issues reported in this thread can be resolved by ensuring that the longer named tool can be discovered from your PATH variable.

In a future release, we'll update the message to more directly instruct which executable is being sought.

@aaaidan
Copy link

aaaidan commented Nov 15, 2023

Excuse my ignorance, is there a workaround mentioned in this thread? I'm having the same issue on macos 13.4.

@meshula
Copy link
Member

meshula commented Nov 16, 2023

The suggestion is to ensure that pyside6-uic is discovered in your $PATH, and that the path that is discovered is actually the pyside6-uic that corresponds to the Qt & Python you are building OpenUSD with.

If I type which pyside6-uic on my machine, I get /Users/MyName/Library/Python/3.9/bin/pyside6-uic which is correct for my build set up.

@aaaidan
Copy link

aaaidan commented Nov 16, 2023

Thanks for the help. I could get it in my path but I’m not really sure what pyside6-uic is (something to do with Qt?) or how to install it.

This seems like a dependency of OpenUSD, yeah?

@meshula
Copy link
Member

meshula commented Nov 16, 2023

pyside6-uic is installed by pip install PySide6. PySide6 is the current version of the Python bindings for Qt. It is an dependency needed by usdview, which is an optional component of an OpenUsd installation. running build_usd.py with the argument --no-usdview will skip usdview, and the need for PySide6 and the pyside6-uic tool.

@meshula
Copy link
Member

meshula commented Nov 16, 2023

By the way, this is kind of general support question is really good to take over to the Academy Software Foundation Slack at https://join.slack.com/t/academysoftwarefdn/shared_invite/zt-26cdobq7r-PgxHjW2co9_y8KaXhnOUXg ~ there's people hanging out over there who are quite knowledgeable about Python, configuration, and building, and willing to help people out with things like this. Look for the #wg-usd channel.

@aaaidan
Copy link

aaaidan commented Nov 16, 2023

Perfect thanks.

I also found that --no-python flag works if you just want usdcat and usdtree.

@drwave
Copy link

drwave commented Nov 16, 2023 via email

@drwave
Copy link

drwave commented Nov 16, 2023 via email

@meshula
Copy link
Member

meshula commented Jan 30, 2024

The build script allows the name of the uic tool to be specified, which would solve the problem when the pyside tool is named uic.

if PYSIDE in requiredDependencies:
    # Special case - we are given the PYSIDEUICBINARY as cmake arg.
    usdBuildArgs = context.GetBuildArguments(USD)
    given_pysideUic = 'PYSIDEUICBINARY' in " ".join(usdBuildArgs)

    # The USD build will skip building usdview if pyside6-uic or pyside2-uic is
    # not found, so check for it here to avoid confusing users. This list of 
    # PySide executable names comes from cmake/modules/FindPySide.cmake
    pyside6Uic = ["pyside6-uic"]
    found_pyside6Uic = any([which(p) for p in pyside6Uic])
    pyside2Uic = ["pyside2-uic"]
    found_pyside2Uic = any([which(p) for p in pyside2Uic])
    if not given_pysideUic and not found_pyside2Uic and not found_pyside6Uic:
        PrintError("uic not found -- please install PySide2 or PySide6 and"
                   " adjust your PATH. (Note that this program may be"
                   " named {0} depending on your platform)"
                   .format(" or ".join(set(pyside2Uic+pyside6Uic))))
        sys.exit(1)

We could amend the message to note that the name of the executable can be supplied via the PYSIDEUICBINARY cmake variable.

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

8 participants