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

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

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

Sofia.Mabrey gravatar image

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

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:

edit retag flag offensive close merge delete


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 -0600 )edit

I have the exact same issue.

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

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 -0600 )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 -0600 )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 -0600 )edit

It works for me too. Many thanks!

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

Same here! Thank you so much!!

Tortelenny gravatar image Tortelenny  ( 2020-06-30 04:47:09 -0600 )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 -0600 )edit

1 Answer

Sort by ┬╗ oldest newest most voted

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

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


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 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

This also worked for me!

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

Question Tools



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

Seen: 21,055 times

Last updated: Jun 12 '20