cannot import name 'Texture3D' from 'vispy.visuals.volume'
Opened this issue · 3 comments
When I attempted running the following lines of code in a kernel in both spyder and jupyter note book
#ClearMap path
import sys
sys.path.append('/home/gangliagurdian/ClearMap2')
#load ClearMap modules
from ClearMap.Environment import * #analysis:ignore
I received the following error cannot import name 'Texture3D' from 'vispy.visuals.volume.
I checked the file volume.py in /anaconda3/envs/ClearMap/lib/python3.7/site-packages/vispy/visuals but I couldn't find any mention of Texture3D. Any help would be appreciated.
Hi,
@c3rry
Could you add the way you did the installation and the version that you are using ?
Thanks
I followed the instructions in Luke Hammond's video on ClearMap2
https://www.youtube.com/watch?v=-WehURPyIa8&t=2213s
I downloaded ClearMap2's latest version (2.1) as a zip file, then I extracted and created a conda environment based on ClearMap.yml file. I then opened the CellMap.py file and added the following lines of code
`import sys
sys.path.append("/home/gangliaguardian/Documents/ClearMap-master")
from ClearMap.Environment import * #analysis:ignore
#directories and files
directory = '/home/gangliaguardian/Documents/clearmap2test'
expression_raw = 'cfos/brain4_cfos<s,4>.tif'
expression_auto = 'autof/brain4_autof<f,4>.tif'
ws = wsp.Workspace('CellMap', directory=directory);
ws.update(raw=expression_raw, autofluorescence=expression_auto)
ws.info()
ws.debug = False
resources_directory = settings.resources_path`
and that's when I received the full error:
Traceback (most recent call last):
File "/home/gangliaguardian/anaconda3/envs/ClearMap/lib/python3.7/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/Scripts/CellMap.py", line 43, in
from ClearMap.Environment import * #analysis:ignore
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/Environment.py", line 40, in
import ClearMap.IO.Workspace as wsp
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/IO/Workspace.py", line 33, in
import ClearMap.Visualization.Plot3d as q_plot_3d
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/Visualization/Plot3d.py", line 23, in
from ClearMap.Visualization.Vispy.Plot3d import * #analysis:ignore
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/Visualization/Vispy/Plot3d.py", line 36, in
import ClearMap.Visualization.Vispy.VolumeVisual as volume_visual
File "/home/gangliaguardian/Documents/ClearMap-master/ClearMap/Visualization/Vispy/VolumeVisual.py", line 41, in
from vispy.visuals.volume import Texture3D, TextureEmulated3D, VertexBuffer, IndexBuffer
ImportError: cannot import name 'Texture3D' from 'vispy.visuals.volume' (/home/gangliaguardian/anaconda3/envs/ClearMap/lib/python3.7/site-packages/vispy/visuals/volume.py)
Thank you so much for any help you can provide.
Hi @c3rry,
For the installation, please follow the instructions in this page:
https://clearanatomics.github.io/ClearMapDocumentation/installation.html
especially the use of the installation script
./install.sh -f ClearMapUi39.yml
Please report once you have achieved the installation with this method
Is there a good reason for you to use the CellMap.py script ?
As you will see in the documentation, the GUI is now the prefered way to proceed if you want to use standard processing, otherwise, the new_api scripts are a good starting point.