Getting rez-gui to use a PySide package

463 views
Skip to first unread message

Jack Straw

unread,
Aug 19, 2015, 6:13:12 AM8/19/15
to rez-config
Hi,

I am trying to get rez-gui to use PySide from a package instead of from the rez python environment. It looks like it should be possible; https://groups.google.com/d/topic/rez-config/J428kYYj6Ts/discussion

I have binded PySide, and when I run "rez-env rezgui" it resolves PySide correctly and I can even run python and "import PySide" without error.

However when I run "rez-gui" in the context or "rez-env rezgui -- rez-gui" I get this error; rez.exceptions.RezGuiQTImportError: rez-gui requires either PyQt4 or PySide; neither package could be imported.

Thanks,

Jack.

Allan Johns

unread,
Aug 19, 2015, 12:15:05 PM8/19/15
to rez-c...@googlegroups.com
Hey Jack,

Based on your description, the likely issue is that for whatever reason the rez-gui binary you're running is actually coming from the rez installation, not the rezgui rez package. To check, do 'rez-env rezgui', then 'which rez-gui'.

If it isn't that, I would, in the same rez'd env, start python and import rezgui.qt. This is the sourcefile that generates that error, you can start digging there.

Let me know how you get on,
A





--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

Mark Streatfield

unread,
Aug 20, 2015, 7:46:14 PM8/20/15
to rez-config
I had the same problem last week and it was as Allan describes.

I found I had to start rez gui using the follow command in a rez-env'd environment:

    python -m rez.cli._main gui

However if you find a better solution please share!

Mark.

Jack Straw

unread,
Aug 21, 2015, 5:46:39 AM8/21/15
to rez-config
Thanks Allan and Mark,

Allans method worked for me, I am guessing that the the cli executor script is not launching python in a resolved environment, but just directly from the context the executable is run in (using the rez virtual env).

I will try taking a look at it.

Jack.

Allan Johns

unread,
Aug 21, 2015, 12:33:36 PM8/21/15
to rez-c...@googlegroups.com
The issue is that the rezgui package's rez-gui binary isn't visible on PATH before the rez installation's rez-gui. Rez is supposed to append itself to the end of PATH, or at least after a resolved environment's packages have added to PATH..

Mylene Pepe

unread,
May 22, 2018, 2:17:08 PM5/22/18
to rez-config
hello everyone,

this is an old post, but i am seeing the same problem with rez 2 fresh from master, rez bin is preprended to PATH not appended apparently.
is there a way to control this?

thanks,

--
my.

bash-4.2$ rez-env rezgui


You are now in a rez-configured environment.


resolved by ... on Tue May 22 10:51:24 2018, using Rez v2.18.0


requested packages:

rezgui                

~platform==linux      (implicit)

~arch==x86_64         (implicit)

~os==CentOS-7.4.1708  (implicit)


resolved packages:

PyQt-4.10.1         .../PyQt/4.10.1/platform-linux/arch-x86_64/os-CentOS-7.4.1708/python-2.7  

arch-x86_64         .../arch/x86_64                                                           

os-CentOS-7.4.1708  .../os/CentOS-7.4.1708                                                    

platform-linux      .../platform/linux                                                        

python-2.7.5        .../python/2.7.5/platform-linux/arch-x86_64/os-CentOS-7.4.1708            

rez-2.18.0          .../rez/2.18.0/platform-linux/arch-x86_64/os-CentOS-7.4.1708              

rezgui-2.18.0       .../rezgui/2.18.0/platform-linux/arch-x86_64/os-CentOS-7.4.1708           

sip-4.14.6          .../sip/4.14.6/platform-linux/arch-x86_64/os-CentOS-7.4.1708/python-2.7   



> bash-4.2$ type rez-gui

rez-gui is .../software/rez/2.18.0/bin/rez/rez-gui


> bash-4.2$ echo $PATH | sed 's^:^\n^g'

.../software/rez/2.18.0/bin/rez

.../packages/python/2.7.5/platform-linux/arch-x86_64/os-CentOS-7.4.1708/bin

.../packages/PyQt/4.10.1/platform-linux/arch-x86_64/os-CentOS-7.4.1708/python-2.7/bin

.../packages/rezgui/2.18.0/platform-linux/arch-x86_64/os-CentOS-7.4.1708/bin

/usr/local/bin

/usr/bin

/bin

.../software/rez/2.18.0/bin/rez

Mylene Pepe

unread,
May 22, 2018, 2:19:13 PM5/22/18
to rez-config
ah, nvm, i just found where this is happening on our code!
all good now :)

thanks,
--
my.
Reply all
Reply to author
Forward
0 new messages