Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1626 Discussions

Qt Plugin Error

renata_falguera
Beginner
2,823 Views

Hi everybody, 

I'm using Intel DevCloud to train my robot on the CoppeliaSim Simulator, but every time that I run the process I get this error:  " the application failed to start because no qt platform plugin could be initialized. reinstalling the app may fix this problem.."

Can someone help me with this issue? 

0 Kudos
1 Solution
ArunJ_Intel
Moderator
2,672 Views

Hi Renata,

 

The issue is with the order you have executed commands, From my triage I could figure you might be running "export LD_LIBRARY_PATH" commands in the wrong order ie(you might be exporting LD_LIBRARY_PATH in an order different to what I have provided)

Please make sure the given order is followed. 

 

Assuming you have completed all pip installs and conda installs given in my previous response already. I will list down the steps once again to make the order bit more crisp for you.

Follow steps 1 and 2 from my previous response to reach a compute node with x11 forwarding. Then follow the below steps in exact order

 

 

 

conda activate qtenv
export COPPELIASIM_ROOT=/home/u****/CoppeliaSim_Edu_V4_1_0_Ubuntu18_04
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/u****/.conda/envs/qtenv/lib
python copeliasim/PyRep/examples/example_panda_reach_target.py

 

 

 In case if you are still facing issues please share the output of "env" command after the python script fails. "env" gives information about all environment variables.

 

Thanks

Arun

 

View solution in original post

0 Kudos
12 Replies
ArunJ_Intel
Moderator
2,809 Views

Hi Renata,



Seems like your error is due to devcloud not having QT installed.

There are two issues to address here.


 (1)Devcloud does not have qt installed by default. 

 (2)Devcloud does not have a GUI

 

To address point (1) you could try installation methods to install qt in your home directory. An example to install qt in home would be creating a conda environment and installing qt in this environment. Below are some steps you could follow.


conda create -n QTenvironment -y

conda activate QTenvironment

conda install -c anaconda qt 


Then you could try installing your simulator software in this conda environment.


For the point (2) you should you should forward your qt gui to your local machine which has a GUI. The below link has some steps which addresses this


https://forum.qt.io/topic/68877/how-to-forward-remote-gui-to-local-screen-when-deploying-from-qt-creator



Thanks

Arun


0 Kudos
ArunJ_Intel
Moderator
2,800 Views

Hi Renata,


Have you tried out the suggestions we have provided?. Is there any further clarifications you need any of these.


Thanks

Arun


0 Kudos
renata_falguera
Beginner
2,795 Views

Hi, Arun!

I tried the suggestions you provided, but I still have the same problem, the qt plugin did not load, although I installed the qt plugin in the anaconda environment. Is there any other solution to this problem?

 

Thanks,

Renata

0 Kudos
ArunJ_Intel
Moderator
2,788 Views

Hi



Could you please list down/share all the steps, you are trying out and your application. So we could try to reproduce this from our end. Also share a screenshot of the error.


Thanks

Arun


0 Kudos
renata_falguera
Beginner
2,783 Views

Hi, Arun!

Currently, I'm working with PyRep API (git repository) and the CoppeliaSim Simulator. For you to test, here are the steps:

export COPPELIASIM_ROOT=EDIT/ME/PATH/TO/COPPELIASIM/INSTALL/DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
  • Create anaconda env and installed the qt plugin
  • On PyRep folder: python -m pip install -r requirements.txt and python -m pip install .
  • On devcloud is necessary to run the application in headless mode. Most of the PyRep codes have the headless mode as False. So for you to test, I modified the file PyRep/examples/example_panda_reach_target.py by applying headless to True.  So, run: python PyRep/examples/example_panda_reach_target.py 

The error that I got:

error.png

 

Thanks,

Renata

0 Kudos
ArunJ_Intel
Moderator
2,764 Views

Hi Renata,

 

Please follow the below steps to run copeliasim on devcloud. (The order of steps are important).

I have also added the steps you have provided in your previous response as step 3 to make the steps complete.

1)ssh to devcloud with -X flag.(-X flag is for X11 forwarding it forwards GUI to your local machine)

 

ssh -X devcloud

 

2)Request a compute node with -X flag

 

qsub -X -I

 

3)Download CoppeliaSim: 

wget https://www.coppeliarobotics.com/files/CoppeliaSim_Edu_V4_1_0_Ubuntu18_04.tar.xz

Unpack CoppeliaSim.tar.xz file

Git clone the PyRep: https://github.com/stepjam/PyRep

To use the PyRep API I needed to add the following to the ~/.bashrc file (or run the following commands in shell:)

 

export COPPELIASIM_ROOT=EDIT/ME/PATH/TO/COPPELIASIM/INSTALL/DIR

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT

export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT

 

4)Create a conda environment , install packages and export environment variables as below. 

 

conda create -n qtenv python pip -y

conda activate qtenv

conda install -c conda-forge libxkbcommon -y

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{PATH_TO_CONDA_ENV}/lib

conda install -c anaconda qt -y

 

{PATH_TO_CONDA_ENV} should be replaced with your conda environment. (The path that appears when running "conda env list" for qtenv )

5) Change to PyRep folder and run.

 

pip install -r requirements.txt

pip install .

 

6)Now run your python sample. from git cloned PyRep.

 

python PyRep/examples/example_panda_reach_target.py 

 

In case if you are still facing issues. run the below command to enable QT_DEBUG_PLUGINS and send us the log you get when you run example_panda_reach_target.py . 

 

export QT_DEBUG_PLUGINS=1

 

Please let me know if you need any clarifications or any detailed explanation for any of these steps.

 

 

 

Thanks

Arun

 

 

0 Kudos
ArunJ_Intel
Moderator
2,723 Views

Hi Renata,


Have you tried out the suggestions we have provided?. Are you able to run copeliasim without issues on devcloud.


Thanks

Arun Jose


0 Kudos
renata_falguera
Beginner
2,685 Views

Hi Arun!

Last week I tried out all your suggestions, but now I'm getting this error: Screenshot from 2021-02-22 11-13-19.png

 

0 Kudos
ArunJ_Intel
Moderator
2,673 Views

Hi Renata,

 

The issue is with the order you have executed commands, From my triage I could figure you might be running "export LD_LIBRARY_PATH" commands in the wrong order ie(you might be exporting LD_LIBRARY_PATH in an order different to what I have provided)

Please make sure the given order is followed. 

 

Assuming you have completed all pip installs and conda installs given in my previous response already. I will list down the steps once again to make the order bit more crisp for you.

Follow steps 1 and 2 from my previous response to reach a compute node with x11 forwarding. Then follow the below steps in exact order

 

 

 

conda activate qtenv
export COPPELIASIM_ROOT=/home/u****/CoppeliaSim_Edu_V4_1_0_Ubuntu18_04
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/u****/.conda/envs/qtenv/lib
python copeliasim/PyRep/examples/example_panda_reach_target.py

 

 

 In case if you are still facing issues please share the output of "env" command after the python script fails. "env" gives information about all environment variables.

 

Thanks

Arun

 

0 Kudos
RobertCrook
Beginner
2,575 Views

Go to setting the environment variables to get anaconda working.

0 Kudos
ArunJ_Intel
Moderator
2,561 Views

Hi Renata


Have you verified the order of environment variables and LD_LIBRARY_PATH as pointed out?. Let us know if you still have any issues.


Thanks

Arun Jose


0 Kudos
ArunJ_Intel
Moderator
2,544 Views

Hi Renata,


As we have not heard back from you for some time we assume the issue is resolved. We wouldn't be monitoring this thread any further, please feel free to raise a new thread in case of any further issues.


Thanks

Arun


0 Kudos
Reply