VPython installation problem

4,410 views
Skip to first unread message

rnlf...@gmail.com

unread,
Feb 22, 2017, 1:03:31 PM2/22/17
to VPython-users
Hi.

I exactly followed the instructions on the first page of vpython.org and there's problem.

I installed Anaconda and run the command "pip install vpython".

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-7-d3aeb28694f5> in <module>()
----> 1 from vpython import *
      2 box()

ModuleNotFoundError: No module named 'vpython'


and of course there's no following imports 


from __future__ import division, print_function
from math import *


At least I can find the VPython kernel .

It seems the vpython wasn't installed properly. What's the proper installation of it?

Your help would be greatly appreciated!!

Aaron Titus

unread,
Feb 22, 2017, 1:05:57 PM2/22/17
to vpytho...@googlegroups.com
Are you running this program in Jupyter Notebook?  If not, run:

jupyter notebook

from the commend line of a terminal. When you click the “New” button, it should have an option in the menu that says “VPython.” Select this, then type your program, and use shift-enter to run it.

Aaron Titus

--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

rnlf...@gmail.com

unread,
Feb 22, 2017, 1:09:10 PM2/22/17
to VPython-users
I was running this program in Jupiter Notebook

Aaron Titus

unread,
Feb 22, 2017, 1:24:16 PM2/22/17
to vpytho...@googlegroups.com
Do you see a VPython option when you create a new notebook? If yes, then VPython should be installed. If not, then you will receive that error.

Aaron

On Feb 22, 2017, at 1:09 PM, rnlf...@gmail.com wrote:

I was running this program in Jupiter Notebook

rnlf...@gmail.com

unread,
Feb 22, 2017, 1:25:15 PM2/22/17
to VPython-users
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-db688cfe291d> in <module>()
----> 1 from vpython import *

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/vpython/__init__.py in <module>()
      8 # Keep this import last to ensure that __version__ and __gs_version__ exist
      9 # before importing vpython, which itself imports both of those.
---> 10 from .vpython import *

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/vpython/vpython.py in <module>()
     56 # Clean out of nbextensions old vpython files (now in nbextensions/vpython_libraries)
     57 nbdir = jupyter_data_dir()+'/nbextensions/'
---> 58 nb = os.listdir(nbdir)
     59 deletions = ['glow.2.1.min.js', 'glowcomm.js']
     60 for f in nb:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/dacoon/Library/Jupyter/nbextensions/'


Now the error's like this.

Aaron Titus

unread,
Feb 22, 2017, 1:29:28 PM2/22/17
to vpytho...@googlegroups.com
This helps.

On Sunday, I installed the new VPython version (released last week) on my wife’s laptop. However, the nbextensions folder didn’t install for some reason. So I copied the missing folder from my laptop to hers, and everything worked.

I suspect this might be a bug with the new installer that was released last week.

Aaron

Message has been deleted

rnlf...@gmail.com

unread,
Feb 22, 2017, 1:40:00 PM2/22/17
to VPython-users
That helps a lot. I should just wait then.

Bruce Sherwood

unread,
Feb 22, 2017, 3:04:20 PM2/22/17
to VPython-users
Yup. I'm able to reproduce the error. I'll work on this. Thanks for the report.

Bruce

Bruce Sherwood

unread,
Feb 23, 2017, 7:26:03 AM2/23/17
to VPython-users
Just released: Jupyter VPython 2.0.2, which fixes this problem. The problem showed up only if vpython had never been installed before.

Bruce

guillermo lorca

unread,
Mar 2, 2018, 8:28:15 AM3/2/18
to VPython-users


El jueves, 23 de febrero de 2017, 9:26:03 (UTC-3), Bruce Sherwood escribió:
Just released: Jupyter VPython 2.0.2, which fixes this problem. The problem showed up only if vpython had never been installed before.

Bruce

hello. can you help me?...installed python following this instruccions

 

·         In a Power Shell or Command Prompt (Windows) or Terminal (Mac / Linux) run this command, which will install VPython 7 for Python 2.7, 3.4, 3.5, or 3.6:
pip install vpython

      Or if using Anaconda, conda install -c vpython vpython

 

     There will be frequent updates to this module. You can get the latest version this way:
pip install vpython --upgrade

      Or if using Anaconda, conda update -c vpython vpython


th

the error is:

Traceback (most recent call last):
  File "prueba.py", line 2, in <module>
    from vpython import *

ModuleNotFoundError: No module named 'vpython'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
    import subprocess, tempfile, os.path, re, pwd, grp, os, time
  File "/usr/lib/python3.6/subprocess.py", line 136, in <module>
    import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'

Original exception was:
Traceback (most recent call last):
  File "prueba.py", line 2, in <module>
    from vpython import *

ModuleNotFoundError: No module named 'vpython'


thanks!


wh

Reply all
Reply to author
Forward
0 new messages