Description of problem
Hi everyone. I tried to see the 3D morphology of a pyramid cell downloaded from NeuroMorpho.Org
. I used plot_morphology
with plot_3d=False
and successfully drew a 2D morphology. But when I altered False
to True
, an error returned, see in Traceback. I have no idea about it since I also import the mayavi
package as suggested in User’s guide.
Minimal code to reproduce problem
from brian2 import *
from brian2tools import*
from mayavi import*
morpho = Morphology.from_file('neuromorpho//allen cell types//CNG version//H16-06-013-05-06-02_576010060_m_DendriteAxon.CNG.swc')
figure()
plot_morphology(morpho, plot_3d=True, show_compartments= True, show_diameter=True)
show()
What you have aready tried
Checked any package was imported if necessary. Altered plot_3d=False
to True
to see the 3D image but failed.
Expected output (if relevant)
A 3D morphology should be like this (in User’s guide)
Actual output (if relevant)
A 2D morphology is available, rather than 3D.
Full traceback of error (if relevant)
Traceback (most recent call last):
File "d:\一些文档啥的\2023学年\chengxu\pyramid.py", line 9, in <module>
plot_morphology(morpho, plot_3d=True, show_compartments= True, show_diameter=True)
File "D:\python\envs\brain\Lib\site-packages\brian2tools\plotting\morphology.py", line 304, in plot_morphology
import mayavi.mlab as mayavi
File "D:\python\envs\brain\Lib\site-packages\mayavi\mlab.py", line 15, in <module>
from mayavi.core.common import process_ui_events
File "D:\python\envs\brain\Lib\site-packages\mayavi\core\common.py", line 21, in <module>
from pyface import api as pyface
File "D:\python\envs\brain\Lib\site-packages\pyface\api.py", line 13, in <module>
from .about_dialog import AboutDialog
File "D:\python\envs\brain\Lib\site-packages\pyface\about_dialog.py", line 15, in <module>
from .toolkit import toolkit_object
File "D:\python\envs\brain\Lib\site-packages\pyface\toolkit.py", line 23, in <module>
toolkit = toolkit_object = find_toolkit("pyface.toolkits")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\envs\brain\Lib\site-packages\pyface\base_toolkit.py", line 285, in find_toolkit
plugin for plugin in importlib_metadata.entry_points()[entry_point]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "D:\python\envs\brain\Lib\importlib\metadata\__init__.py", line 287, in __getitem__
raise KeyError(name)
KeyError: 'pyface.toolkits'