You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I followed the instructions on this repository to install the rvctool environment on my machine (Ubuntu 20.04.6 LTS). I did not use Conda, since I am not using Python for any other projects. When I lunch rvctool, I get import errors at startup (see below).
To Reproduce
Run pip install rvc3python. All seems to go well.
Launch rvctool (In my case it is not in PATH, but I can launch it from ~/.local/bin.)
You get the "startup page" in the terminal, but import errors are reported.
Expected behavior
There should be no import errors.
Screenshots
Here is the contents of my "startup page":
john@doe:~/.local/bin$ ./rvctool
____ _ _ _ __ ___ _ ___ ____ _ _ _____
| _ \ ___ | |__ ___ | |_(_) ___ ___ \ \ / (_)___(_) ___ _ __ ( _ ) / ___|___ _ __ | |_ _ __ ___ | | |___ /
| |_) / _ \| '_ \ / _ \| __| |/ __/ __| \ \ / /| / __| |/ _ \| '_ \ / _ \/\ | | / _ \| '_ \| __| '__/ _ \| | |_ \
| _ < (_) | |_) | (_) | |_| | (__\__ \_ \ V / | \__ \ | (_) | | | | | (_> < | |__| (_) | | | | |_| | | (_) | | ___) |
|_| \_\___/|_.__/ \___/ \__|_|\___|___( ) \_/ |_|___/_|\___/|_| |_| \___/\/ \____\___/|_| |_|\__|_| \___/|_| |____/
|/
for Python (RTB==1.1.0, MVTB==0.9.6, SG==1.1.8, SMTB==1.1.8, NumPy==1.24.4, SciPy==1.10.1, Matplotlib==3.7.2)
import math
import numpy as np
from scipy import linalg, optimize
import matplotlib.pyplot as plt
from spatialmath import *
from spatialmath.base import *
from spatialmath.base import sym
from spatialgeometry import *
from roboticstoolbox import *
from machinevisiontoolbox import *
import machinevisiontoolbox.base as mvb
# useful variables
from math import pi
puma = models.DH.Puma560()
panda = models.DH.Panda()
func/object? - show brief help
help(func/object) - show detailed help
func/object?? - show source code
Results of assignments will be displayed, use trailing ; to suppress
Python 3.8.10 (default, May 26 2023, 14:05:08)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.2 -- An enhanced Interactive Python. Type '?' for help.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 startup()
File ~/.local/lib/python3.8/site-packages/RVC3/bin/rvctool.py:235, in startup()
234 def startup():
--> 235 plt.ion()
File ~/.local/lib/python3.8/site-packages/matplotlib/pyplot.py:555, in ion()
553 stack.callback(ion if isinteractive() else ioff)
554 matplotlib.interactive(True)
--> 555 install_repl_displayhook()
556 return stack
File ~/.local/lib/python3.8/site-packages/matplotlib/pyplot.py:157, in install_repl_displayhook()
155 ipython_gui_name = backend2gui.get(get_backend())
156 if ipython_gui_name:
--> 157 ip.enable_gui(ipython_gui_name)
File ~/.local/lib/python3.8/site-packages/IPython/terminal/interactiveshell.py:932, in TerminalInteractiveShell.enable_gui(self, gui)
928 self.active_eventloop = self._inputhook = None
930 if gui and (gui not in {"inline", "webagg"}):
931 # This hook runs with each cycle of the `prompt_toolkit`'s event loop.
--> 932 self.active_eventloop, self._inputhook = get_inputhook_name_and_func(gui)
933 else:
934 self.active_eventloop = self._inputhook = None
File ~/.local/lib/python3.8/site-packages/IPython/terminal/pt_inputhooks/__init__.py:134, in get_inputhook_name_and_func(gui)
132 gui_mod = gui
133 if gui.startswith("qt"):
--> 134 gui = set_qt_api(gui)
135 gui_mod = "qt"
137 mod = importlib.import_module("IPython.terminal.pt_inputhooks." + gui_mod)
File ~/.local/lib/python3.8/site-packages/IPython/terminal/pt_inputhooks/__init__.py:117, in set_qt_api(gui)
114 return
116 # Import it now so we can figure out which version it is.
--> 117 from IPython.external.qt_for_kernel import QT_API
119 return qt_env2gui[QT_API]
File ~/.local/lib/python3.8/site-packages/IPython/external/qt_for_kernel.py:123
119 return [qt_api]
122 api_opts = get_options()
--> 123 QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
124 enum_helper = enum_factory(QT_API, QtCore)
File ~/.local/lib/python3.8/site-packages/IPython/external/qt_loaders.py:376, in load_qt(api_options)
373 if "QT_API" in os.environ:
374 del os.environ["QT_API"]
--> 376 raise ImportError(
377 """
378 Could not load requested Qt binding. Please ensure that
379 PyQt4 >= 4.7, PyQt5, PyQt6, PySide >= 1.0.3, PySide2, or
380 PySide6 is available, and only one is imported per session.
381
382 Currently-imported Qt library: %r
383 PyQt5 available (requires QtCore, QtGui, QtSvg, QtWidgets): %s
384 PyQt6 available (requires QtCore, QtGui, QtSvg, QtWidgets): %s
385 PySide2 installed: %s
386 PySide6 installed: %s
387 Tried to load: %r
388 """
389 % (
390 loaded_api(),
391 has_binding(QT_API_PYQT5),
392 has_binding(QT_API_PYQT6),
393 has_binding(QT_API_PYSIDE2),
394 has_binding(QT_API_PYSIDE6),
395 api_options,
396 )
397 )
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7, PyQt5, PyQt6, PySide >= 1.0.3, PySide2, or
PySide6 is available, and only one is imported per session.
Currently-imported Qt library: 'pyqt5'
PyQt5 available (requires QtCore, QtGui, QtSvg, QtWidgets): False
PyQt6 available (requires QtCore, QtGui, QtSvg, QtWidgets): False
PySide2 installed: False
PySide6 installed: False
Tried to load: ['pyqt5']
'%.3g;'
>>>
Additional context
I am not a Python user, so I might be missing something very simple...
May be related, since I see Qt stuff in the import errors: when trying the trplot2(R) command on page 34, I get a blank window:
(The window contains the information visible in the terminal over which it appeared).
The text was updated successfully, but these errors were encountered:
While trying to solve this, I ran across this page in which a similar problem is described. This answer solved it for me. I can also see the graph from trplot2(R) on page 34.
Describe the bug
I followed the instructions on this repository to install the
rvctool
environment on my machine (Ubuntu 20.04.6 LTS). I did not use Conda, since I am not using Python for any other projects. When I lunchrvctool
, I get import errors at startup (see below).To Reproduce
pip install rvc3python
. All seems to go well.rvctool
(In my case it is not inPATH
, but I can launch it from~/.local/bin
.)Expected behavior
There should be no import errors.
Screenshots
Here is the contents of my "startup page":
Additional context
trplot2(R)
command on page 34, I get a blank window:(The window contains the information visible in the terminal over which it appeared).
The text was updated successfully, but these errors were encountered: