I am trying to run the example programs that come with Visual Python ("VPython") like bounce.py
, orbit.py
, etc through bash.
When I'm in the folder which contains these examples (C:\Python27\Lib\site-packages\visual\examples), I can right-click on any of the examples and choose "open with" and then select "python.exe" from the list of given programs. This method is able to run the programs just fine and it generates the visual representation of a ball bouncing in a room, orbiting balls, etc.
On the other hand, when I use bash to navigate to this folder and then try to run python bounce.py
, I get the error message:
Traceback (most recent call last): File "bounce.py", line 1, in from visual import * ImportError: No module named visual
I was under the impression that calling python bounce.py
was effectively the same as opening the file with the python executable but the behavior is different. I'm not sure why the "open with python.exe" method would allow the example to find the visual module but opening the example through bash is unable to find the same module. Any advice or help would be appreciated.
(Side note, I am running Bash on Ubuntu on Windows through the new beta https://msdn.microsoft.com/en-us/commandline/wsl/about)