0

I'm using ubuntu 16.04 and python files that were using vpython that were working fine before now crash showing

from visual import *
ImportError: No module named visual.

I installed anaconda, still nothing. I launched jupyter notebook on the terminal, it opens on a new window in google chrome. I created a test.py file containing just

import vpython

and it prompts:

Traceback (most recent call last):
File "teste vpython.py", line 1, in <module>
import vpython
File "/home/user/anaconda2/lib/python2.7/site-
packages/vpython/__init__.py", line 10, in <module>
from .vpython import *
File "/home/user/anaconda2/lib/python2.7/site-
packages/vpython/vpython.py", line 507, in <module>
get_ipython().kernel.comm_manager.register_target('glow', GlowWidget)
AttributeError: 'NoneType' object has no attribute 'kernel'

I would appreciate if somebody could help me. I know there are similar tags, but I did as every answer I checked as suggested with no results. Thank you.

1 Answers1

0

I have Ubuntu 16.04 with Anaconda and Python 3.6. Just now I created another environment that contains Python 2.7. In that environment I did "pip install vpython --upgrade" and verified with "pip show vpython" that the version is indeed 7.0.3. I then executed "jupyter notebook" and demo programs ran fine.

I am puzzled by your comment that you created a test.py file, and by the line that says "File "teste vpython.py", line 1, in ". I would expect a file with the .ipynb extension, so something doesn't seem right.

I'll advertise that a better place to pose VPython questions is in the VPython forum at

https://groups.google.com/forum/?fromgroups&hl=en#!forum/vpython-users

user1114907
  • 972
  • 8
  • 15