Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to import Texture3D or TextureEmulated3D #2271

Open
pbl007 opened this issue Dec 12, 2021 · 6 comments
Open

Failing to import Texture3D or TextureEmulated3D #2271

pbl007 opened this issue Dec 12, 2021 · 6 comments

Comments

@pbl007
Copy link

pbl007 commented Dec 12, 2021

Hello,

I am getting the following error while trying to import Texture3D

Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:53) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.30.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from vispy.visuals.volume import Texture3D
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-6d0e9705592c> in <module>
----> 1 from vispy.visuals.volume import Texture3D

ImportError: cannot import name 'Texture3D' from 'vispy.visuals.volume' (/opt/miniconda3/envs/ClearMap/lib/python3.7/site-packages/vispy/visuals/volume.py)

This is the version of vispy installed in the specific environment (needed for frozen app)
vispy 0.9.4 py37hc59e7c5_0 conda-forge

Help will be much appreciated!
Thanks in advance.
pbl007

@djhoese
Copy link
Member

djhoese commented Dec 13, 2021

Is there a reason you are importing the Texture3D class from the volume module instead of the vispy.gloo module/subpackage? The VolumeVisual no longer uses the Texture3D class directly but instead uses a higher-level wrapper class so it no longer imports Texture3D directly.

@pbl007
Copy link
Author

pbl007 commented Dec 13, 2021

Hi. The app code is not under my control.... is there a chance to solve the issue for the specific version of vispy (0.9.4)?
Thanks in advance!

@almarklein
Copy link
Member

The app code is not under my control....

But what aspect is under your control by which means this issue may be fixed?

@pbl007
Copy link
Author

pbl007 commented Dec 13, 2021

All code is open so I could, in principle, branch and modify but the same env/code works for me in a Linux cluster, now installing in another server completely fails.

@djhoese
Copy link
Member

djhoese commented Dec 13, 2021

@pbl007 You can downgrade vispy to <0.7.0 because I think this was changed in 0.7.0. Is the code you are using on github or gitlab? Can a pull/merge request be made? The fix for using that code as-is is to downgrade vispy. The fix for that project long term is to fix the import which would work for all versions of vispy (pre and post 0.7).

@pbl007
Copy link
Author

pbl007 commented Dec 13, 2021

This is what indeed what I will do! Thanks!

healthonrails added a commit to healthonrails/ClearMap2 that referenced this issue Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants