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

Dev version of vispy required on Python 3.9 #453

Closed
spartakb opened this issue Nov 11, 2020 · 3 comments
Closed

Dev version of vispy required on Python 3.9 #453

spartakb opened this issue Nov 11, 2020 · 3 comments
Milestone

Comments

@spartakb
Copy link

Following the MacOS instructions for running the client, and getting the following output with error. Please help.

INFO:__main__:Disabling STL printouts
INFO:__main__:Foundation not found. Menu will show python as application name
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Could not initialize [linuxjsdev]: Only supported on Linux
INFO:cfclient.utils.input.inputreaders:Successfully initialized [pysdl2]
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/configs/config.json
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
===== 2020.11.10 16:11:50 =====
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/gui.py", line 197, in <module>
    main()
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/gui.py", line 164, in main
    from .ui.main import MainUI
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/ui/main.py", line 33, in <module>
    import cfclient.ui.tabs
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/ui/tabs/__init__.py", line 41, in <module>
    from .locopositioning_tab import LocoPositioningTab
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 53, in <module>
    from vispy import scene
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/scene/__init__.py", line 33, in <module>
    from .visuals import *  # noqa
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/scene/visuals.py", line 18, in <module>
    from .. import visuals
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/__init__.py", line 14, in <module>
    from .axis import AxisVisual  # noqa
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/axis.py", line 11, in <module>
    from .visual import CompoundVisual
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/visual.py", line 94, in <module>
    from .transforms import TransformSystem
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/transforms/__init__.py", line 10, in <module>
    from .base_transform import BaseTransform  # noqa
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/transforms/base_transform.py", line 238, in <module>
    from .chain import ChainTransform  # noqa
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/transforms/chain.py", line 9, in <module>
    from .linear import NullTransform
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/visuals/transforms/linear.py", line 10, in <module>
    from ...geometry import Rect
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/geometry/__init__.py", line 20, in <module>
    from .torusknot import TorusKnot  # noqa
  File "/Users/administrator/Workspace/bitbucket.org/spartak/playground/crazyflie/crazyflie-clients-python/lib/python3.9/site-packages/vispy/geometry/torusknot.py", line 4, in <module>
    from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/fractions.py)

My python version output:

Python 3.9.0 (default, Nov 10 2020, 16:17:28) 
[Clang 12.0.0 (clang-1200.0.32.21)] on darwin
@krichardsson
Copy link
Contributor

I can confirm that I get the same problem. Seems to be related to vispy vispy/vispy#1947

@krichardsson
Copy link
Contributor

A workaround until vispy is fixed could be to use python 3.8 if possible

@ataffanel ataffanel changed the title ImportError: cannot import name 'gcd' from 'fractions' (/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/fractions.py) Cannot run the client on Python 3.9 because of Vispy Nov 18, 2020
ataffanel pushed a commit that referenced this issue Nov 18, 2020
This is fixing the client in python 3.9. When vispy releases its next
version, the special handling for python 3.9 can be removed.
@ataffanel
Copy link
Member

The problem has apparently been pushed in the vispy master branch. I pushed a temporary fix that pulls vispy from git instead of from a release. This fixes the problem and the client can now run with Python 3.9.

When the next version of vispy releases, we can remove the fix and settle on the new vispy version. Let's keep this ticket open as a reminder.

@ataffanel ataffanel changed the title Cannot run the client on Python 3.9 because of Vispy Dev version of vispy required on Python 3.9 Nov 19, 2020
@jonasdn jonasdn added this to the next-release milestone Mar 17, 2021
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

4 participants