rqt_graph pyqt binding of qt_gui_cpp library - pyqt5

I am using ROS-melodic in ubuntu 18.04 LTS. I am getting this error:
Could not import "pyqt" bindings of qt_gui_cpp library - so C++ plugins will not be available:
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
from . import libqt_gui_cpp_sip
ImportError: dynamic module does not define module export function (PyInit_libqt_gui_cpp_sip)
however I have installed pyqt5 and pydot manually, rqt_graph shows up but with this warning. I want to know what can I do to get it right? Is this going to be problem in future? Now rqt_graph is loading but I don't know if this will mess up/create lacking in the graph?

Try uninstalling double packages if any using
pip3 uninstall PyQt5-sip PyQt5
Then try importing it in python3 to check if any other version is there.
If the import is successful then try running the command again
rosrun rqt_graph rqt_graph
if still some error exists install
pip3 install PyQt5==5.12

Related

Cartopy: importing from new install results in symbol not found in flat namespace '_GEOSCoordSeq_create_r'

I'm setting up a new MacBook and testing the code that I ran on my old Macbook.
One module I need is cartopy. I have installed it using the MacOS instructions detailed here -> https://scitools.org.uk/cartopy/docs/latest/installing.html
This all installs no problem. However when I try to import cartopy I hit the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cartopy/__init__.py", line 107, in <module>
import cartopy.crs # noqa: E402 module-level imports
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cartopy/crs.py", line 27, in <module>
import cartopy.trace
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cartopy/trace.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_GEOSCoordSeq_create_r'
Tried uninstalling proj downgrading to proj7 via homebrew then uninstalling and reinstalling cartopy -> no effect
Tried uninstalling and reinstalling geos via homebrew then uninstalling and reinstalling cartopy -> no effect
Tried uninstalling and reinstalling shapely for versions earlier than 2 then uninstalling and reinstalling cartopy -> no effect
Tried installing cartopy via conda with conda install -c conda-forge cartopy -> this results in a package which I can import but which contains none of the cartopy functions and only basic functions from the "string" package.
My current versions are
cartopy 0.21.0
shapely 1.8.5.post1
geopandas 0.11.1
geos 3.11.0
proj 9.1.0
Has anyone hit this problem before and solved it?
Sorry for asking but I've been stuck on this for ages.
I managed to get cartopy installed via conda but only in the default anaconda environment. That will do but still no idea why I couldn't get it working from pip using the instructions on the cartopy site

ModuleNotFoundError on venv after upgrade to Ubunbtu 20.04

I've just upgraded my home server OS to Ubuntu 20.04 and having funny problems.
It seems like somehow python's PATH information is messed up.
Traceback (most recent call last):
File "/home/myname/dirname/venvname/bin/pip3", line 6, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip'
After brief research, I've figured out Ubuntu 20.04 dropped support on Python2.
So I installed Python2 and pip manually and tried the above command again, but still throwing the same error.
Traceback (most recent call last):
File "/home/myname/dirname/venvname/bin/gunicorn", line 6, in <module>
from gunicorn.app.wsgiapp import run
ModuleNotFoundError: No module named 'gunicorn'
Moreover, It throws the same kind of error for Gunicorn.
So, I believe this is not a problem just related to Python2.
I know it is insufficient information for diagnostic, but I have no idea what would be helpful.
So any guess or ask for additional information would be appreciated.
EDIT 1) I've reinstall python on venv with
sudo apt purge python3
sudo apt install python3
and still have the same problem.
Does python3 -m pip works? I am not sure if it would work, but I resolved this kind of error by invoking pip like this previously.
After some tries, I've give up the original venv and make a new one. There was some chore to setup venv and project again, but it works just fine.
If anyone has the same issue, consider re-make another venv.

Python can't import requests, numpy

I downloaded a Python 3.5 application which needs to import requests, overpy, numpy and tk. So, when I try to import, say, requests, I get:
Traceback (most recent call last): File "", line 1, in
ImportError: No module named 'requests'
I have searched the internet for answers and the best I could find is in this link getting error for importing numpy at Python 3.5.1 . I do have other versions installed, 2.7 is installed by default, however knowing where the problem is doesn't offer a solution.
If it is relevant to configuration issues, I have a Mac with El Capitan.
Do you have pip installed? It's likely that you don't have the package readily available. You will need to download pip for your operating system (if you haven't already), then run
pip install requests
http://docs.python-requests.org/en/master/user/install/
If you have pip installed and think you have requests installed as well, then run
pip freeze
It's most likely not an issue with your python versions, though you will want to be sure when you install pip that it is installed in the correct location.

ImportError: No module named core.framework.graph_pb2

When I follow the Installation for linux from tensorflow offical site, everything is fine until the last step: Train your first TensorFlow neural net model.
When I execute the command, python tensorflow/models/image/mnist/convolutional.py, An ImportError promps.
Traceback (most recent call last):
File "tensorflow/models/image/mnist/convolutional.py", line 13, in <module>
import tensorflow.python.platform
File "/home/guo/haplox/Github/tensorflow/tensorflow/__init__.py", line 4, in <module>
from tensorflow.python import *
File "/home/guo/haplox/Github/tensorflow/tensorflow/python/__init__.py", line 13, in <module>
from tensorflow.core.framework.graph_pb2 import *
ImportError: No module named core.framework.graph_pb2
My OS is 14.04.1-Ubuntu.
I have met the exactly same issue. once your have installed the tensorflow successfully, it's not about the library dependency anymore.
if your executed the convolution.py 100% accurately as manual and get the exception like below
ImportError: No module named core.framework.graph_b2
this means you are executing the python script exactly under the cloned project root directory,let's say the root named "src".
src$python tensorflow/models/image/mnist/convolutional.py
please try to execute the script in the parent directory of the cloned root directory. for example, if your just clone the tensorflow under src dir, goto its parent dir like xxx and do it again.
xxx$python src/tensorflow/models/image/mnist/convolutional.py
bingo, it works like a charm!
I had the same issue and the solution was to uninstalled protocol buffer v2.6.
TensorFlow requires protocol buffer v3.0, which should come with your TensorFlow installation/source. Hope this helps.
Most probably you have either outdated version of:
python's six module. Install the newest one (pip install six) or upgrade your old one (pip install --upgrade six)
protobuf
I solved it by using virtualenv, but there are many other factors which may cause the same error.
More solutions are at Github issues #81, #61,
#51.
For me, the solution was to run with python3 instead python

faulty install of Matplotlib

Windows7 with python 3.4 32bit.
Downloaded and ran install according to this related question.
However I have a different error, so I posted a new question.
I removed the faulty install and tried the installer from the sourceforge link off matplotlib.org. Both finish claiming to be successful, though testing results in an error (both resulting in the same error)
from matplotlib import *
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from matplotlib import *
File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 105, in <module>
import six
ImportError: No module named 'six'
Actually you need to install six. As given in Python Error: "ImportError: No module named six"
Better you can install pip and install all libraries using that.