ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""

asked 2020-06-11 23:45:03 -0500

Sofia.Mabrey gravatar image

updated 2020-06-12 02:32:03 -0500

gvdhoorn gravatar image

ROS 2 tutorial, Introducing turtlesim and rqt, instructs us to execute the following commands in two cmd windows (I am exercising on Windows 10 platform), ros2 run turtlesim turtlesim_node and ros2 run turtlesim turtle_teleop_key. Both commands fails with the error message:

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Does this mean that I need to install Qt? If yes, why isn't Qt included in Foxy release, or, as part of install instruction? Could you provide the pointer where I can download free version of Qt? Once I install Qt, what else do I need to do so that the turtlesim will work successfully? Thanks a lot for the help.

My foxy installation was successful. At the end of the installation, both ros2 run demo_nodes_cpp talker and ros2 run demo_nodes_py listener worked. I am just started with the ros2 tutorial. The command set | findstr ROS produced the following:

ROS_DISTRO=foxy
ROS_LOCALHOST_ONLY=0
ROS_PYTHON_VERSION=3
ROS_VERSION=2
edit retag flag offensive close merge delete

Comments

I have the same issue I would like help getting this going. I also cant run rqt without getting plugin.xml non found errors

Dawson gravatar image Dawson  ( 2020-06-13 13:49:39 -0500 )edit

I have the exact same issue.

lzsyvj gravatar image lzsyvj  ( 2020-06-18 06:46:35 -0500 )edit
4

Found a fix: In Windows 10 set environment variable QT_QPA_PLATFORM_PLUGIN_PATH and point it to where PyQT5 DLL's were installed to, in my case C:\Python38\Lib\site-packages\PyQt5\Qt\plugins\platforms

lzsyvj gravatar image lzsyvj  ( 2020-06-18 19:37:45 -0500 )edit

I will try this tomorrow and see if it works for me too, thank you so much for sharing your fix!!

Dawson gravatar image Dawson  ( 2020-06-18 19:51:54 -0500 )edit

I mentioned your fix to the Microsoft team and it fixed the same issue on eloquent as well! thank you Izsyvj

Dawson gravatar image Dawson  ( 2020-06-19 17:22:27 -0500 )edit

It works for me too. Many thanks!

Sofia.Mabrey gravatar image Sofia.Mabrey  ( 2020-06-21 20:40:07 -0500 )edit

Same here! Thank you so much!!

Tortelenny gravatar image Tortelenny  ( 2020-06-30 04:47:09 -0500 )edit

This hasn't helped me, Can someone please help? Also I noticed that is says turtlesim is only available for Dashing onward? I'm using Foxy, is this going to hinder my ability to use turtlesim?

staticoli gravatar image staticoli  ( 2020-12-21 06:13:56 -0500 )edit

1 Answer

Sort by » oldest newest most voted
9

answered 2020-12-28 10:01:24 -0500

flargo gravatar image

I run into the same problem. In my case (Foxy on Windows 10), the solution was to set the variable QT_QPA_PLATFORM_PLUGIN_PATH to C:\dev\ros2_foxy\bin\platforms, the path to qwindows.dll delivered by ROS2. It was confusing since there is another qwindows.dll file under C:\Python38\Lib\site-packages\PyQt5\Qt\plugins\platforms as described by @Izsyvj.

edit flag offensive delete link more

Comments

This worked like a charm. Thank You :) I also set that up in the Power Shell profile settings such that I don't have to do it every time I open a new shell.

prabin_rath gravatar image prabin_rath  ( 2021-01-01 02:54:11 -0500 )edit

Worked for me as well. Wish the ROS team would add this in their tutorial.

sabin gravatar image sabin  ( 2021-02-01 12:15:21 -0500 )edit

I tried it and it works for me too. Thank you! It's really necessary to add this solution in ROS2 tutorial

Erfan Zekri gravatar image Erfan Zekri  ( 2021-03-22 07:07:42 -0500 )edit

It also worked for me!(rolling version on Windows 10). Just like what you said, it is weird that a qwindows.dll is also in PyQt5\Qt\plugins\platforms😑

Dorthyn gravatar image Dorthyn  ( 2021-04-13 05:43:49 -0500 )edit

I don't have \PyQt5 folder inside the \Lib\site-packages. Should i install PyQt5 with pip?

0zzy0sbourne gravatar image 0zzy0sbourne  ( 2022-02-13 03:02:38 -0500 )edit

This also worked for me!

ROS2_user gravatar image ROS2_user  ( 2022-05-26 05:15:56 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2020-06-11 23:45:03 -0500

Seen: 21,597 times

Last updated: Jun 12 '20