-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bug Sur, problem importing navis #17
Comments
I've seen that issue. Will think about a way to catch this specific issue but in the meantime you could try to mock vispy before importing |
I finally had time to try this myself. This is a bit hacky it but it should let you import and work with navis (minus vispy plotting obviously): import sys
from unittest.mock import MagicMock
# Mock vispy and relevant submodules
sys.modules['vispy'] = MagicMock()
sys.modules['vispy.util'] = MagicMock()
sys.modules['vispy.gloo'] = MagicMock()
sys.modules['vispy.gloo.util'] = MagicMock()
sys.modules['vispy.util.transforms'] = MagicMock()
sys.modules['vispy.util.quaternion'] = MagicMock()
sys.modules['vispy.geometry'] = MagicMock()
# Now you should be able to import navis
import navis |
Thanks, this works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
import navis
, I can't seem to import vispy, since upgrading to Big Sur (see: vispy/vispy#1885). This hasn't been fixed yet, even with python 3.9.1. I'm mostly using notebooks, and therefore don't require vispy. Any workaround for this until it's fixed to use navis without vispy? Thanks!The text was updated successfully, but these errors were encountered: