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

ImportError:No module named PythonQt #628

Open
Jerryxiaoyu opened this issue Oct 17, 2019 · 3 comments
Open

ImportError:No module named PythonQt #628

Jerryxiaoyu opened this issue Oct 17, 2019 · 3 comments

Comments

@Jerryxiaoyu
Copy link

I downloaded the latest Drake precompiled release and tried to run the following code:

 from director.consoleapp import ConsoleApp

app = ConsoleApp()
view = app.createView()
view.showMaximized()
app.start()

but got the error ImportError: No module named PythonQt
Is there something that I need to add to PYTHONPATH ?

@patmarion
Copy link
Member

Hi @Jerryxiaoyu,

The director package comes with a binary named directorPython. Try using this instead of python to launch the program. PythonQt is not a standard python module that can be found in the python path, it has to be initialized from C++. The directorPython command line program is equivalent to python but it manages the initialization of Qt and PythonQt.

@Jerryxiaoyu
Copy link
Author

Great! I complied the director package and used directorPython to run the program. It works well.
Thanks a lot! @patmarion

@patmarion
Copy link
Member

patmarion commented Oct 18, 2019

Great, glad it worked!

I have a change that I've been experimenting with that removes the requirement of using directorPython. I might land something like this in the future after a little more testing.

#629

cc @EricCousineau-TRI

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

2 participants