No Module Named PyQt5 and Pyside2 Error While Trying to open rqt - ros

I've been trying to use the ROS(Robot Operating System) using this page:
Tutorial page
In the link it makes you use turtle sim it seemed to work fine with me without any errors.
In the 4th step(install rqt),i get this error:
`INPUT: RQT
OUTPUT: ImportError for 'pyqt': No module named 'PyQt5'
ModuleNotFoundError: No module named 'PyQt5'
ModuleNotFoundError: No module named 'PySide2'`
There was more lines of error but it seemed irrelevant to me because it only says file names.
I'm using python version 3.8.3 and qt version 5.12.12.
I downloaded the qt manually in their website.Didn't use:
pip install PyQt5
And i don't exactly remember now but someone said something about local files of pyhton but i had none of them:
screenshot of C:\Users\Boran\AppData\Local\Programs
It supposed to be Pyhton files in here.
Also there is no problem about python it works fine and i used talker and listener(pyhton coded applications of ROS.) and they worked fine.

I solved the problem by installing graphviz.It appears that to run rqt i had to install graphviz.

Related

Dot cannot be run in Pycharm with Sphinx and Graphviz

I am trying to create a class diagram with sphinx. For this I created a virtual environment in Pycharm and added this to conf.py:
extensions = ['sphinx.ext.autodoc','sphinx.ext.inheritance_diagram']
In my spamfilter.rst file I added the following lines:
Diagrams
=================
.. inheritance-diagram:: spamfilter
The output is not a diagram and looks like this.
The following warning is displayed:
WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting
When I look into the folder C:\Users\Name\PycharmProjects\documentation\venv\Lib\site-packages\graphviz, there is a dot.py file, so I do not understand what is wrong. A similar question for Mac OS has been asked here. I tried the solution but it seems like it only works for Mac, because when I paste export PATH=$PATH:~/opt/bin to the Pycharm Terminal, it tells me that the command export could not be found. Honestly I have problems understanding why sometimes you can just use packages and other times they cannot be found even when they are installed, I am self-taught and a beginner.
The "pip install graphviz" command installs a Python package that provides an interface to Graphviz (https://pypi.org/project/graphviz). This package is not required by Sphinx.
In order to create inheritance diagrams with Sphinx, the actual Graphviz toolkit (including dot.exe) must be installed. See https://www.graphviz.org.
If dot.exe is not in the PATH, you can use the graphviz_dot configuration option.
I had the same problem where rendering a C4 model with PlantUML didn't work in the IDE (PyCharm 2022.2.1 Pro) on a newer M1 MacOS Monterey. I had it working on a Big Sur intel Mac prior to the upgrade with no extra effort, so the chip change caused me to go down a lot of paths with Rosetta and so on that were all unsuccessful.
The error was:
Dot Executable: /opt/local/bin/dot
File does not exist
Cannot find Graphviz.
Graphviz was installed correctly, and dot was on my path, but it wasn't in /opt/local/bin/dot. Since it was in /opt/homebrew/bin/dot, all I needed to do was link the actual file with the path it was searching for:
cd /opt
sudo ln -s homebrew local
et voilĂ , PyCharm is now correctly rendering the puml in the IDE.

Cannot find reference 'ximgproc' in '__init__.py

i want to use cv2.ximgproc module.
this is add-on module at Opencv
but there is a problem to load module.
I tried pip install opencv-contrib-python but it doesn't work.
to be precise its already installed but can't not find cv2.ximgproc module.
import cv2
...
cv2.ximgproc.thinning( ... )
that's my import section.
So, I tried paste source file from OpenCV github
but there is only C++ source..
( sometimes .py file exist. but that is not file I need. )
It is just PyCharm Error.
PyCharm represents 'Can't find'.
but I Run my code, and its works well..

Problem with OpenCV C++ Ubuntu 16.04-/usr/bin/ld: cannot find -lopencv_*

I am new to Ubuntu. I installed OpenCV following http://milq.github.io/install-opencv-ubuntu-debian/. Note that opencv_contrib are not installed. I had an error initially that opencv4.pc file was not found which I corrected by creating a new opencv4.pc in usr/local/lib and making appropriate changes in ~/.bashrc file. Now the error while compiling using c++ file from :
https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/.
This is the error I got:
.
I tried to locate the missing files in other locations but I was unable to find them. Please help me solve my problem.

Can not run lua script from Fceux emulator usnig torch

I am using Fceux 2.2.3 emulator and i am trying to run a lua script using torch while playing super mario bros. When i load the script i face this error
Lua thread bombed out: error loading module 'libpaths' from file
'/home/antonis/torch/install/lib/lua/5.1/libpaths.so':
/home/antonis/torch/install/lib/lua/5.1/libpaths.so: undefined
symbol: lua_gettop
I looked in the specific folder in the path and the libpaths.so is there.
What this error means?
You need to build tha latest FCEUX from source (https://github.com/TASVideos/fceux) using the option to use system libraries. Then you specify LuaJIT (install it first) in the SContruct file and install. After that, install torch on your system. It will be available to FCEUX through "require 'torch'". That is the way I did it (right now, tbh), but you could probably install Torch first and then link its own LuaJIT files to FCEUX.

Kivy Garden fails with error

I have downloaded the prepackaged Kivy zip file onto a Windows 8.1 machine and installed Kivy-Garden using pip (after running kivy.bat). However, I have been unable to successfully use Kivy-Garden. I have attempted the following commands:
garden install graph
garden list
However, neither of them work. They both result in the following error:
Traceback (most recent call last):
File "c:\kivy\Python27\Scripts\garden", line 5, in <module>
pkg_resources.run_script('Kivy-Garden==0.1.1', 'garden')
File "C:\Python27\lib\site-packages\pkg_resources.py", line 483, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "C:\Python27\lib\site-packages\pkg_resources.py", line 1335, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'garden'
Does this indicate a bad installation? How might I fix it?
Kivy for windows comes in a bundle with all the prerequisites to run, since some are hard to install in windows, so it's not using you installed python.
You should go to your kivy installation folder, inside you'll find the python folder, inside is the python descriptor used for kivy, you can run that python exe, or use pip or easy install (i don't remember if both), like an extra advice i could saw to use PyCharm to program, it's easy to install the python modules and code, i have it myself with SqlAlchemy instaled from the PyCharm Gui (previous config here Configure PyCharm and Kivy).
In the other hand you can configure kivy to run with your installed python (instructions here Kivy with an installed Python in Windows) i haven't tried myself since i use the same python included in kivy with no problems
I never figured out why pip wouldn't work, but I found a workaround.
Just download the package from pypi and run setup.py:
https://pypi.python.org/pypi/kivy-garden/0.1.1
The only workaround I've found that works is to manually install flowers into the kivy garden folder. Ceremcem has a great explanation of it here: filebrowser error in windows for kivy
Also I found I had to explicitly use pip2 for pip to work.

Resources