Open zwl8979 opened 1 year ago
You need to have a backend GUI toolkit installed (PySide, PyQt, or WxPython). If you have one of these and it is not being automatically discovered (or you have multiple installed in the same environment), you may need to manually specify via the ETS_TOOLKIT
environment variable.
See https://docs.enthought.com/pyface/toolkits.html for more information about ETS toolkits.
Edit to add: that page is a bit out-of-date - qt
is preferred over qt4
, althought qt4
should still work even with Qt5 or Qt6. See also https://docs.enthought.com/pyface/#toolkit-backends
You need to have a backend GUI toolkit installed (PySide, PyQt, or WxPython). If you have one of these and it is not being automatically discovered (or you have multiple installed in the same environment), you may need to manually specify via the
ETS_TOOLKIT
environment variable.See https://docs.enthought.com/pyface/toolkits.html for more information about ETS toolkits.
Edit to add: that page is a bit out-of-date -
qt
is preferred overqt4
, althoughtqt4
should still work even with Qt5 or Qt6. See also https://docs.enthought.com/pyface/#toolkit-backends
Thank you for your positive suggestion. The following is the list of packages installed in my virtual environment, conda list used: 1.https://user-images.githubusercontent.com/96425538/227682401-97c218cc-5493-4517-b41d-b3484304fc83.png
Your QT_API
environment is likely the problem - it's asking for PyQt (ie Qt4 version) but you have Qt5 installed in your environment, so importing it will likely fail. Try removing pyqt
and set the QT_API
environment to pyqt5
.
Hello, bro, have you fixed this problem? I met the same issue as follows:
How is traitsui installed in your environment - it doesn't seem to be picking up the entrypoints for the backend toolkits?
I have installed the traitsui package. The following packages installed in the virtual environment are listed as follows (wzc) root@1d61b6b03fc4:~/DAIR-V2X# conda list
#
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
absl-py 1.4.0 pypi_0 pypi
addict 2.4.0 pypi_0 pypi
aiofiles 22.1.0 pypi_0 pypi
aiosqlite 0.19.0 pypi_0 pypi
anyio 3.6.2 pypi_0 pypi
apptools 5.1.0 pyhd3eb1b0_0
argon2-cffi 21.3.0 pypi_0 pypi
argon2-cffi-bindings 21.2.0 pypi_0 pypi
arrow 1.2.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
babel 2.12.1 pypi_0 pypi
backcall 0.2.0 pypi_0 pypi
beautifulsoup4 4.12.2 pypi_0 pypi
black 23.3.0 pypi_0 pypi
blas 1.0 mkl
bleach 6.0.0 pypi_0 pypi
bzip2 1.0.8 h7b6447c_0
c-ares 1.19.0 h5eee18b_0
ca-certificates 2023.01.10 h06a4308_0
cached-property 1.5.2 pypi_0 pypi
cachetools 5.3.0 pypi_0 pypi
certifi 2022.12.7 py37h06a4308_0
cffi 1.15.1 pypi_0 pypi
charset-normalizer 3.1.0 pypi_0 pypi
click 8.1.3 pypi_0 pypi
configobj 5.0.6 py37h06a4308_1
cudatoolkit 10.2.89 hfd86e86_1
curl 7.88.1 h5eee18b_0
cycler 0.11.0 pypi_0 pypi
dbus 1.13.18 hb2f20db_0
debugpy 1.6.7 pypi_0 pypi
decorator 5.1.1 pypi_0 pypi
defusedxml 0.7.1 pypi_0 pypi
deprecated 1.2.13 pypi_0 pypi
deprecation 2.1.0 pypi_0 pypi
descartes 1.1.0 pypi_0 pypi
entrypoints 0.4 pypi_0 pypi
envisage 6.0.1 pyhd3eb1b0_0
exceptiongroup 1.1.1 pypi_0 pypi
expat 2.4.9 h6a678d5_0
fastjsonschema 2.16.3 pypi_0 pypi
fire 0.5.0 pypi_0 pypi
flake8 3.9.2 pypi_0 pypi
fontconfig 2.14.1 h52c9d5c_1
fonttools 4.38.0 pypi_0 pypi
fqdn 1.5.1 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
future 0.18.3 py37h06a4308_0
giflib 5.2.1 h5eee18b_3
glib 2.69.1 he621ea3_2
google-auth 2.18.0 pypi_0 pypi
google-auth-oauthlib 0.4.6 pypi_0 pypi
grpcio 1.54.0 pypi_0 pypi
gst-plugins-base 1.14.1 h6a678d5_1
gstreamer 1.14.1 h5eee18b_1
hdf4 4.2.13 h3ca952b_2
hdf5 1.10.4 hb1b8bf9_0
icu 58.2 he6710b0_3
idna 3.4 pypi_0 pypi
imageio 2.28.1 pypi_0 pypi
importlib-metadata 6.6.0 pypi_0 pypi
importlib-resources 5.12.0 pypi_0 pypi
iniconfig 2.0.0 pypi_0 pypi
intel-openmp 2021.4.0 h06a4308_3561
ipykernel 6.16.2 pypi_0 pypi
ipython 7.34.0 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
ipywidgets 8.0.6 pypi_0 pypi
isoduration 20.11.0 pypi_0 pypi
jedi 0.18.2 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
joblib 1.2.0 pypi_0 pypi
jpeg 9e h5eee18b_1
json5 0.9.11 pypi_0 pypi
jsoncpp 1.9.4 hff7bd54_2
jsonpointer 2.3 pypi_0 pypi
jsonschema 4.17.3 pypi_0 pypi
jupyter 1.0.0 pypi_0 pypi
jupyter-client 7.4.9 pypi_0 pypi
jupyter-console 6.6.3 pypi_0 pypi
jupyter-core 4.12.0 pypi_0 pypi
jupyter-events 0.6.3 pypi_0 pypi
jupyter-packaging 0.12.3 pypi_0 pypi
jupyter-server 1.24.0 pypi_0 pypi
jupyter-server-fileid 0.9.0 pypi_0 pypi
jupyter-server-ydoc 0.8.0 pypi_0 pypi
jupyter-ydoc 0.2.4 pypi_0 pypi
jupyterlab 3.6.3 pypi_0 pypi
jupyterlab-pygments 0.2.2 pypi_0 pypi
jupyterlab-server 2.22.1 pypi_0 pypi
jupyterlab-widgets 3.0.7 pypi_0 pypi
kiwisolver 1.4.4 pypi_0 pypi
krb5 1.19.4 h568e23c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcurl 7.88.1 h91b91d3_0
libdeflate 1.17 h5eee18b_0
libedit 3.1.20221030 h5eee18b_0
libev 4.33 h7f8727e_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgfortran-ng 7.5.0 ha8ba4b0_17
libgfortran4 7.5.0 ha8ba4b0_17
libgomp 11.2.0 h1234567_1
libnetcdf 4.6.1 h11d0813_2
libnghttp2 1.46.0 hce63b2e_0
libogg 1.3.5 h27cfd23_1
libpng 1.6.39 h5eee18b_0
libssh2 1.10.0 h8f2d780_0
libstdcxx-ng 11.2.0 h1234567_1
libtheora 1.1.1 h7f8727e_3
libtiff 4.1.0 h2733197_0
libuuid 1.41.5 h5eee18b_0
libuv 1.44.2 h5eee18b_0
libvorbis 1.3.7 h7b6447c_0
libwebp 1.2.4 h11a3e52_1
libwebp-base 1.2.4 h5eee18b_1
libxcb 1.15 h7f8727e_0
libxml2 2.9.14 h74e7548_0
llvmlite 0.31.0 pypi_0 pypi
lyft-dataset-sdk 0.0.8 pypi_0 pypi
lz4-c 1.8.1.2 h14c3975_0
markdown 3.4.3 pypi_0 pypi
markupsafe 2.1.2 pypi_0 pypi
matplotlib 3.5.2 pypi_0 pypi
matplotlib-inline 0.1.6 pypi_0 pypi
mayavi 4.7.1 py37h94891b3_2
mccabe 0.6.1 pypi_0 pypi
mistune 2.0.5 pypi_0 pypi
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py37h7f8727e_0
mkl_fft 1.3.1 py37hd3c417c_0
mkl_random 1.2.2 py37h51133e4_0
mmcv-full 1.3.8 pypi_0 pypi
mmdet 2.14.0 pypi_0 pypi
mmdet3d 0.17.1 dev_0
This may possibly be an issue with the conda package (which we don't control) - the immediate error you are seeing is because the toolkit entrypoints are not being discovered, which means that the appropriate package metadata isn't available - either because Conda didn't install it or something has replaced it.
The TraitsUI version is also fairly old, but that shouldn't be a cause of the problem. Similarly with Python 3.7 which is almost end-of-life.
I would suggest trying a re-install; you might also try using a different package manager - either venv and pip, or something like EDM
Thanks for your patience! I change the environment and another new problem happened (sad).
That's something even more fundamentally wrong with the install - you don't have a HOME
environment variable set. Not sure what to suggest, as that's pretty fundamental for linux/unix environments.
Traceback (most recent call last): File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/importlib_metadata/init.py", line 289, in getitem return next(iter(self.select(name=name))) StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/zhangweili/DAIR-V2X-main/tools/visualize/vis_label_in_3d.py", line 3, in
import mayavi.mlab as mlab
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/mayavi/mlab.py", line 16, in
from mayavi.tools.camera import view, roll, yaw, pitch, move
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/mayavi/tools/camera.py", line 24, in
from .engine_manager import get_engine
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/mayavi/tools/engine_manager.py", line 13, in
from mayavi.preferences.api import preference_manager
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/mayavi/preferences/api.py", line 4, in
from .preference_manager import preference_manager
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/mayavi/preferences/preference_manager.py", line 29, in
from traitsui.api import View, Group, Item
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/api.py", line 256, in
from .editors.api import ArrayEditor
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/editors/init.py", line 16, in
from .api import ArrayEditor
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/editors/api.py", line 86, in
from .code_editor import CodeEditor
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/editors/code_editor.py", line 21, in
class CodeEditor(EditorFactory):
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/editors/code_editor.py", line 33, in CodeEditor
mark_color = Color(0xECE9D8)
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traits/trait_factory.py", line 40, in call
return self.maker_function(*args, *metadata)
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/toolkit_traits.py", line 43, in ColorTrait
return toolkit().color_trait(args, **traits)
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/traitsui/toolkit.py", line 110, in toolkit
_toolkit = find_toolkit("traitsui.toolkits")
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/pyface/base_toolkit.py", line 285, in find_toolkit
plugin for plugin in importlib_metadata.entry_points()[entry_point]
File "/home/ubuntu/anaconda3/envs/dair_v2x/lib/python3.7/site-packages/importlib_metadata/init.py", line 291, in getitem
raise KeyError(name)
KeyError: 'traitsui.toolkits'
mayavi==4.8.1,traitsui==7.2.1, traits==6.2.0, traitlets==5.9.0, importlib_metadata==6.0.0, importlib_resources==5.12.0
What is the reason for this, and how to solve it? Thanks!