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

installed python 3.10 raises an exception #176

Open
Whiskeysaurus opened this issue Oct 28, 2021 · 1 comment
Open

installed python 3.10 raises an exception #176

Whiskeysaurus opened this issue Oct 28, 2021 · 1 comment

Comments

@Whiskeysaurus
Copy link

import vpython

File "C:\Users\justi\AppData\Roaming\Python\Python310\site-packages\vpython_init_.py", line 25, in
raise Exception(s)
Exception: The non-notebook version of vpython requires Python 3.5 or later.
vpython does work on Python 2.7 and 3.4 in the Jupyter notebook environment.

@amad3v
Copy link

amad3v commented Dec 29, 2021

You can edit the __init__.py of vpython from:

__ispython3 = (__p[0] == '3')
__require_notebook = (not __ispython3) or (__p[2] < '5') # Python 2.7 or 3.4 require Jupyter notebook

to:

__ver = [int(i) for i in __p.split(".")]
__ispython3 = __ver[0] == 3
__require_notebook = (not __ispython3) or (
    __ver[1] < 5
)  # Python 2.7 or 3.4 require Jupyter notebook

Or you can follow the changes made in this file which will be in the next version.

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

2 participants