Vpython via Homebrew

54 views
Skip to first unread message

Gianfranco Abrusci

unread,
Nov 6, 2015, 4:31:51 AM11/6/15
to VPython-users
Hello guys,
I'm a mac user and I installed vpython via home-brew. I ran 
python -c 'import visual; visual.sphere()'
to check if everything was right and it worked.
But if I try a kind of interacting mode, such as:

$ python

Python 2.7.9 (default, May  1 2015, 19:04:44)

[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.49)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import visual

>>> visual.sphere()

<visual_common.primitives.sphere object at 0x103223890>

>>>

a gray window pops up but nothing happens. Any suggestions?
Screenshots are attached.
Schermata 2015-11-06 alle 10.20.02.png
Schermata 2015-11-06 alle 10.18.58.png

Steve Spicklemire

unread,
Nov 6, 2015, 4:45:30 AM11/6/15
to vpytho...@googlegroups.com, Steve Spicklemire
Hi Gianfranco,

VPython interaction generally requires a loop with a call to the ‘rate()’ function to invoke the UI handling code.

See the second paragraph here:

<http://vpython.org/contents/new_features.html>

If you need an “interactive shell” experience, you can try this one:

<https://dl.dropboxusercontent.com/u/20562746/vpysh.py>

just run ‘python vpysh.py’ on the command line to give it a try.

Note that we’ve had some trouble with folks using brew and getting wxmac version 3.0.2. You want version 3.0.0 to avoid a problem that was introduced in more recent versions on the mac.

Hope that helps!
-steve
> --
> 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.
> <Schermata 2015-11-06 alle 10.20.02.png><Schermata 2015-11-06 alle 10.18.58.png>

Gianfranco Abrusci

unread,
Nov 6, 2015, 6:04:52 AM11/6/15
to VPython-users, stevespi...@gmail.com
Thanks a lot, Steve!
I added  a rate()-loop and now it works fine. I also tried vpysh.py and it is better than just adding rate(). 
So your suggestion really helped me indeed!

Gianfranco
Reply all
Reply to author
Forward
0 new messages