vpython on Anaconda: status?

2,104 views
Skip to first unread message

GaryP

unread,
Mar 1, 2014, 12:25:28 PM3/1/14
to vpytho...@googlegroups.com
I've recently switched to the Anaconda python "distribution" on OS X 10.7.5.  I now see that there are issues using vpython under Anaconda.

As far as I can tell based on a quick look around, I will have to build boost and vpython manually.  Is that correct? The one or two threads I've seen get detailed, and it's hard to pick out the current status of things.  Is it possible to quickly summarize the status of using vpython with Anaconda?  

Thanks, Gary

Steve Spicklemire

unread,
Mar 1, 2014, 3:10:25 PM3/1/14
to vpytho...@googlegroups.com, Steve Spicklemire
I have not had time to work it out. Sorry!

I think you need to:

1) build boost in a way that works with the Anaconda python.
2) build a vpython binary that works with the Anaconda python (and the boost you built)
3) build a wxPython that works with vpython-6.05 using the Anaconda python.

With everything I have going on right now, this is another summer project for me (if you don't beat me to it!)

sorry,
-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/groups/opt_out.

Bruce Sherwood

unread,
Mar 1, 2014, 3:37:11 PM3/1/14
to vpytho...@googlegroups.com
Make sure you read the instructions in the file MAC-OSX.txt, which should give you a start.

Matt Craig

unread,
Apr 21, 2014, 12:02:32 AM4/21/14
to vpytho...@googlegroups.com
I started looking into this today, and ran into a completely non-python compile problem on OSX 10.9:

GLhandleARB is declared as an int in the glext.h included in vpython, but is void * in the dust em OpenGL framework. The obvious hack -- editing glext.h to be void * -- produces other type errors in utils/shader_program.cpp.

Any suggestions?

Thanks,
Matt

Bruce Sherwood

unread,
Apr 21, 2014, 12:43:42 AM4/21/14
to vpytho...@googlegroups.com
This is probably the same problem for which there is a bug report and proposed fix:

https://github.com/BruceSherwood/vpython-wx/pull/48

Bruce Sherwood

unread,
Apr 21, 2014, 11:39:43 AM4/21/14
to vpytho...@googlegroups.com
I should say that Steve Spicklemire is aware of and interested in this problem but is swamped at the moment with end-of-semester activities. He teaches physics at the University of Indianapolis.

Matt Craig

unread,
Apr 23, 2014, 2:20:04 PM4/23/14
to vpytho...@googlegroups.com
I should say that Steve Spicklemire is aware of and interested in this problem but is swamped at the moment with end-of-semester activities. He teaches physics at the University of Indianapolis.

Understood...I'm on sabbatical this year so I'll give it a shot and report back. The pull request at the github repo did fix the immediate problem.


On Mon, Apr 21, 2014 at 10:39 AM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
I should say that Steve Spicklemire is aware of and interested in this problem but is swamped at the moment with end-of-semester activities. He teaches physics at the University of Indianapolis.

--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/qMyvWsjyJKs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Craig

unread,
Apr 23, 2014, 3:03:57 PM4/23/14
to vpytho...@googlegroups.com
Good news/bad news...I have it compiling, importing and even displaying under anaconda (good), but graphics aren't interactive or updatable (bad).

A couple questions:

+ What version(s) of wxPython does vpython work with? Is it known to work with 3.0.0?
+ How should vpython be invoked is *not* using VIDLE? I assume I simply import visual and make an object...but if that is not the right way please let me know.

Thanks,
Matt


On Wednesday, April 23, 2014 1:20:04 PM UTC-5, Matt Craig wrote:
I should say that Steve Spicklemire is aware of and interested in this problem but is swamped at the moment with end-of-semester activities. He teaches physics at the University of Indianapolis.

Gary Pajer

unread,
Apr 23, 2014, 3:55:30 PM4/23/14
to vpytho...@googlegroups.com
I think 

import visual
visual.sphere()

should display a white sphere.  

By "aren't interactive" do you mean you can't rotate and zoom?   By "not updatable" do you meant that, for instance, executing a statement that changes an object's color has no effect on the displayed object?

~-~-~


Matt Craig

unread,
Apr 23, 2014, 4:08:21 PM4/23/14
to vpytho...@googlegroups.com
> By "aren't interactive" do you mean you can't rotate and zoom? 

Yes.

>  By "not updatable" do you meant that, for instance, executing a statement that changes an object's color has no effect on the displayed object?

Also yes.

I should maybe add that trying to import from the plain python interpreter fails like this:

>>> import visual
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.


ipython lets me import but not manipulate/update.

Matt

On Wednesday, April 23, 2014 2:55:30 PM UTC-5, GaryP wrote:
I think 

import visual
visual.sphere()

should display a white sphere.  

 

Steve Spicklemire

unread,
Apr 23, 2014, 4:13:49 PM4/23/14
to vpytho...@googlegroups.com, Steve Spicklemire
Does Anaconda supply a framework build of python?

thanks,
-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.

Gary Pajer

unread,
Apr 23, 2014, 4:19:21 PM4/23/14
to vpytho...@googlegroups.com
You mean a "Mac Framework build"?  No.  Anaconda provides its own build with a directory structure similar to what you would find on Linux, but rooted elsewhere.

~-~-~

Gary Pajer

unread,
Apr 23, 2014, 4:23:04 PM4/23/14
to vpytho...@googlegroups.com
On Wed, Apr 23, 2014 at 4:08 PM, Matt Craig <mattw...@gmail.com> wrote:
> By "aren't interactive" do you mean you can't rotate and zoom? 

Yes.

>  By "not updatable" do you meant that, for instance, executing a statement that changes an object's color has no effect on the displayed object?

Also yes.

I should maybe add that trying to import from the plain python interpreter fails like this:

>>> import visual
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.


What happens if you "import visual" from an OS console (Terminal app)?  

(or is that what you mean by "plain python interpreter".  I originally thought you meant a VIDLE console.)

Matt Craig

unread,
Apr 23, 2014, 4:52:11 PM4/23/14
to vpytho...@googlegroups.com
> What happens if you "import visual" from an OS console (Terminal app)?  
> (or is that what you mean by "plain python interpreter".  I originally thought you meant a VIDLE console.)

I was not in  VIDLE or IDLE console -- launched from the terminal in both cases.

case 1:

$ python
Python 2.7.6 |Anaconda 1.9.2 (x86_64)| (default, Jan 10 2014, 11:23:15)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import visual
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.

case 2:

$ ipython --pylab=wx
Python 2.7.6 |Anaconda 1.9.2 (x86_64)| (default, Jan 10 2014, 11:23:15)

In [1]: import visual

In [2]: s = visual.sphere()

In [3]: # sphere displays

Bruce Sherwood

unread,
Apr 23, 2014, 5:49:52 PM4/23/14
to vpytho...@googlegroups.com
From a terminal you should be able to run a VPython program named demo.py by executing "python demo.py". You should normally NOT be able to interact with a VPython display by entering "from visual import *" followed by "sphere()" because in order for the display to be alive there has to be continual rendering and checking for events (though Steve Spicklemire has mocked up a special way to work from a terminal one line at a time).

You should also be able to run from VIDLE but currently not from IDLE (due to an acknowledged bug in IDLE concerning the treatment of use of the atexit module).

Steve Spicklemire

unread,
Apr 23, 2014, 6:03:18 PM4/23/14
to vpytho...@googlegroups.com, Steve Spicklemire
Hi Folks,

I think this message is coming from wxPython on the Mac. It apparently wants a framework install of python. I'm surprised that the anaconda version of python would incorporate a version of wxPython that would ask for a framework version of python (which I gather the anaconda version of python lacks?) Unfortunately I have no time at the moment to pursue this. The good news (at least for me) is that the semester is quickly crashing to a close in the next week or two, and one way or the other I'm going to have more time on my hands. ;-) I'll try to dig into this then, if nobody beats me to it.

-steve

Gary Pajer

unread,
Apr 23, 2014, 9:02:26 PM4/23/14
to vpytho...@googlegroups.com
There does seem to be a problem with wxPython on Anaconda (see below).   I have not spent a lot of time tracking it down, but I did find this tweet from Travis O., which might imply that the stock wx that Conda installs is not ready for prime time.

Solving this will require support from both the VPython forum and the Anaconda forum.   Should we be cross posting?

-gary

-----------------------------
the following was run from the terminal, using the stock wx provided by the Conda installer.


Python 2.7.6 |Anaconda 1.9.1 (x86_64)| (default, Jan 10 2014, 11:23:15) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> app = wx.App()
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.

~-~-~


Bruce Sherwood

unread,
Apr 23, 2014, 10:38:29 PM4/23/14
to vpytho...@googlegroups.com
Concerning Python 3: There are nightly builds of a version of wxPython for Python 3, called Phoenix, but there is no formal release version yet. For that reason it hasn't seemed appropriate to try to make binary installers for VPython for Python 3, though there is a small bit of code in the VPython source code to take care of some incompatibilities between the classic and Phoenix versions of wxPython.

Matt Craig

unread,
Apr 23, 2014, 10:44:58 PM4/23/14
to vpytho...@googlegroups.com
Actually, I think everything is working -- from Travis's tweet (or the discussion that followed, anyway) wx needs be run in pythonw, not python.

I grabbed the bouncing ball code from vpython.org, put it in a file called demo.py, and it executes fine from the command line with either:

$ ipython demo.py
$ pythonw demo.py

By "executes fine" I mean I can rotate and scale, the animation is smooth, starts instantly, etc.

As an added bonus I can run it from an ipython notebook too (not with the graphic embedded in the notebook, the graphic opens in a separate window).

I'll get the package up onto binstar.org tomorrow AM, and put the recipes up on github. Getting it working required only a minor tweak to setup.py; most of the linking magic was handled by conda build.

If you want to try it before then, follow the instructions at https://gist.github.com/mwcraig/11239249 which are a bit convoluted; polygon2 is the worst part because pip won't install it and I haven't done the conda package yet...but if you download the gist and run it in bash it should do the job.

By this time tomorrow "conda install vpython" will work, downloading and installing dependencies as needed.

CAVEAT: work *on mac*. Linux is do-able for me. Windows....not this week, but on my radar.

Steve Spicklemire

unread,
Apr 24, 2014, 7:24:12 AM4/24/14
to vpytho...@googlegroups.com
This is most excellent news! Did you have to do anything special to get boost to link correctly? I guess Conda must already have boost recipes?

thanks,
-steve

Gary Pajer

unread,
Apr 24, 2014, 8:27:57 AM4/24/14
to vpytho...@googlegroups.com
Indeed, I got stuck on a Boost issue.    I see you have your own Boost build.

Is curl installed by default on Mac?  (I have it, but I've installed so much extra stuff that I don't know if it came on the Mac, or if I installed it.)

I'll try it out later.     You da man.

-g

~-~-~


Steve Spicklemire

unread,
Apr 24, 2014, 8:40:19 AM4/24/14
to vpytho...@googlegroups.com, Steve Spicklemire
Yes, curl comes with OSX.

-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.

Matt Craig

unread,
Apr 24, 2014, 12:18:38 PM4/24/14
to vpytho...@googlegroups.com
> This is most excellent news! Did you have to do anything special to get boost to link correctly? I guess Conda must already have boost recipes?

conda did have a boost recipe; my only change to it was to only build the pieces (python and signals) needed for vpython.

The key to getting the linking right was to use "conda build ." run in the same directory as the recipe. This builds then uses install_name_tool to make the library names work even though they are not absolute paths.

As it turned out, I didn't really have to do much on my own...

On Thu, Apr 24, 2014 at 6:24 AM, Steve Spicklemire <stevespi...@gmail.com> wrote:


thanks,
-steve

> On Apr 23, 2014, at 10:44 PM, Matt Craig <mattw...@gmail.com> wrote:
>
> By this time tomorrow "conda install vpython" will work, downloading and installing dependencies as needed.

Matt Craig

unread,
Apr 24, 2014, 12:20:54 PM4/24/14
to vpytho...@googlegroups.com
I'll try it out later.

Updated, simplified install instructions:

conda create -n vpy anaconda  # not, strictly speaking, necessary, but a good idea
source activate vpy   # activate the new environment, again, not required, but...
conda install -c mwcraig vpython


Gary Pajer

unread,
Apr 24, 2014, 1:22:49 PM4/24/14
to vpytho...@googlegroups.com
On Thu, Apr 24, 2014 at 12:20 PM, Matt Craig <mattw...@gmail.com> wrote:
I'll try it out later.

Updated, simplified install instructions:

conda create -n vpy anaconda  # not, strictly speaking, necessary, but a good idea
source activate vpy   # activate the new environment, again, not required, but...
conda install -c mwcraig vpython



Dude, it works.  WTF?   It's completely unfair and unconscionable that you could accomplish such a thing without pain, agony, epithets, expletives, and smashed laptops.

A deep bow to yourself, and the Anaconda and VPython communities that made it possible.

-gary 

Steve Spicklemire

unread,
Apr 24, 2014, 1:24:41 PM4/24/14
to vpytho...@googlegroups.com, Steve Spicklemire
Not only that, thanks for doing it as well!

;-)

-steve

On Apr 24, 2014, at 1:22 PM, Gary Pajer <gary....@gmail.com> wrote:

> On Thu, Apr 24, 2014 at 12:20 PM, Matt Craig <mattw...@gmail.com> wrote:
> > I'll try it out later.
>
> Updated, simplified install instructions:
>
> conda create -n vpy anaconda # not, strictly speaking, necessary, but a good idea
> source activate vpy # activate the new environment, again, not required, but...
> conda install -c mwcraig vpython
>
>
>
> Dude, it works. WTF? It's completely unfair and unconscionable that you could accomplish such a thing without pain, agony, epithets, expletives, and smashed laptops.
>
> A deep bow to yourself, and the Anaconda and VPython communities that made it possible.
>
> -gary
>
>
>
>
> On Thu, Apr 24, 2014 at 7:27 AM, Gary Pajer <gary....@gmail.com> wrote:
> Indeed, I got stuck on a Boost issue. I see you have your own Boost build.
>
> Is curl installed by default on Mac? (I have it, but I've installed so much extra stuff that I don't know if it came on the Mac, or if I installed it.)
>
> I'll try it out later. You da man.
>
> -g
>
> ~-~-~
>
>
> On Thu, Apr 24, 2014 at 7:24 AM, Steve Spicklemire<stevespi...@gmail.com> wrote:
> This is most excellent news! Did you have to do anything special to get boost to link correctly? I guess Conda must already have boost recipes?
>
> thanks,
> -steve
>
> > On Apr 23, 2014, at 10:44 PM, Matt Craig <mattw...@gmail.com> wrote:
> >
> > By this time tomorrow "conda install vpython" will work, downloading and installing dependencies as needed.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
> To unsubscribe from this topic, visithttps://groups.google.com/d/topic/vpython-users/qMyvWsjyJKs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email tovpython-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
> To unsubscribe from this topic, visithttps://groups.google.com/d/topic/vpython-users/qMyvWsjyJKs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/qMyvWsjyJKs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.

Matt Craig

unread,
Apr 24, 2014, 1:25:11 PM4/24/14
to vpytho...@googlegroups.com
Thanks :) My only secret superpower is sabbatical..

John

unread,
May 1, 2014, 10:12:34 AM5/1/14
to vpytho...@googlegroups.com
Do these install install instructions work on windows? I get the error message 

"Error: No packages found matching: vpython"

when I enter these commands in a windows Command Prompt window.

Bruce Sherwood

unread,
May 1, 2014, 10:30:06 AM5/1/14
to vpytho...@googlegroups.com
I have no real idea, having no experience with Anaconda. But you mentioned that you don't have a compiler on your Windows machine, so you're going to get stuck at some point (and note that the compiler presumably has to be the same one Anaconda uses). Craig mentions somewhere in that thread that he hadn't tried building on Windows but it sounded like he might. Perhaps you should post to that thread.

By the way, yesterday I wrote to the Anaconda people asking that they consider adding VPython to their distribution. I immediately got a friendly reply that they would look into it.

Bruce


--
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.

John

unread,
May 1, 2014, 12:29:34 PM5/1/14
to vpytho...@googlegroups.com
Thanks for letting Anaconda know about VPython so that they can add it to their installation package. In addition to Anaconda there is another installer for IPython by "Enthought Canopy" also with their own version of Python 2.7.6. Perhaps you can email them also and ask them if they could add VPython to their distribution. Here are the installation instructions for IPython detailing the installation options to choose from.



John

Matt Craig

unread,
May 1, 2014, 1:03:42 PM5/1/14
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
Hi John,

I need to do a windows build -- hope to get to that next week, and will post an update here when it is done. 

Ping me, though, if you don't see anything by next Thursday. 

Matt

Sent from Mailbox for iPhone

Bruce Sherwood

unread,
May 1, 2014, 1:27:39 PM5/1/14
to vpytho...@googlegroups.com
I did indeed write to Enthought. They replied that they weren't uninterested but are currently overwhelmed by work for paying customers. I also wrote to Python(x,y) but got no response.

John

unread,
May 14, 2014, 12:10:55 PM5/14/14
to vpytho...@googlegroups.com
Hi Matt

   Did you manage to do a windows build? Just a friendly reminder.

Thanks

John

Matt Craig

unread,
May 14, 2014, 2:27:09 PM5/14/14
to vpytho...@googlegroups.com
Hi John,

I'm currently trying...though I've never tried building from the command line before in windows with MSVC.

Which is to say it may take a while -- I'll check with the conda folks to see if they can point me to an example windows recipe.

Matt

Matt Craig

unread,
May 24, 2014, 6:43:23 PM5/24/14
to vpytho...@googlegroups.com
I am getting closer to having this work. vpython compiles, but when I try the bouncing ball demo on the home page I get this error:

VPython   ***CRITICAL ERROR***: ..\src\core\display_kernel.cpp:930: cvisual::display_kernel::render_scene: render_scene OpenGL error: ..\src\core\display_kernel.cpp:696 invalid value, aborting.

Any suggestions?

Matt

To unsubscribe from this group and all its topics, send an email to vpython-users+unsubscribe@googlegroups.com.

Bruce Sherwood

unread,
May 24, 2014, 10:23:41 PM5/24/14
to vpytho...@googlegroups.com
As is implied, the error report comes from the attempt to carry out the OpenGL rendering of the scene, which is in a try/catch structure in the C++ code. This doesn't prove that the problem is in the rendering machinery -- it could be that some other part of the code has corrupted some data structures.

You might get a bit more information by running the test program from a terminal with the environment variable VPYTHON_DEBUG set to 1.

Matt Craig

unread,
May 26, 2014, 1:43:00 AM5/26/14
to vpytho...@googlegroups.com
Good news, John! 

Just had a successful anaconda build, will hopefully have a conda package for you to try by Tuesday morning.

Bruce, will have a couple changes to the VCBuild.txt instructions that I'll get to you as a pull request on github (not anaconda-related, just a few details that weren't clear the first time I went through it).

Matt

Matt Craig

unread,
May 26, 2014, 1:47:14 PM5/26/14
to vpytho...@googlegroups.com
John,

Please give this a try (worked on my machine this am, was compiled 32-bit):

conda create -n vpy anaconda  # not, strictly speaking, necessary, but a good idea
activate vpy                           # activate the new environment, again, not required, but avoids messing up working environments
conda install -c mwcraig vpython  # should also install dependencies
# your vpython stuff here!
deactivate                              # leave the virtual environment 

Please report back success or problems....

Thanks,
Matt

John

unread,
May 28, 2014, 8:48:54 AM5/28/14
to vpytho...@googlegroups.com
Hi Matt

   When I try the command

   conda install -c mwcraig vpython

I get the error message

Fetching package metadata: ...
Error: No packages found matching : vpython

Are there other steps I need to take aside from the ones you listed?

Thanks

John

Matt Craig

unread,
May 28, 2014, 9:48:09 AM5/28/14
to vpytho...@googlegroups.com
Hi John,

There shouldn't be -- do you know if you are 32bit or 64bit? I'm guessing that is the issue and will get a 64 bit build going soon.

Matt



--

John

unread,
May 28, 2014, 5:53:12 PM5/28/14
to vpytho...@googlegroups.com
Hi Matt

   Yes I tried it using 64bit version of anaconda and that's why it didn't work. I also have another windows machine with 32bit version of anaconda but it gives me an error whenever I try a conda command such as

  conda update conda

The error has to do with the fact that it can't find the file J-script.py  in a certain directory on my machine. I am unable to locate this file on my 32 bit windows xp system and don't know where I can get a copy of it. Therefore, until I resolve this problem I won't be able to execute the command 

  conda install -c mwcraig vpython

Do you know where I can get a copy of J-script.py ?

John

Matt Craig

unread,
May 28, 2014, 7:07:26 PM5/28/14
to vpytho...@googlegroups.com
Hi John,

I should actually get around to compiling a 64 bit version tonight. 

Sounds like on the 32-bit machine it might be easiest to re-download anaconda and reinstall!

Matt

Gary Pajer

unread,
May 28, 2014, 9:02:37 PM5/28/14
to vpytho...@googlegroups.com
I continue to be impressed.  Thanks for the effort.

Does this same procedure work for both OS X and Windows?

-gary

~-~-~


--

Matt Craig

unread,
May 28, 2014, 10:58:38 PM5/28/14
to vpytho...@googlegroups.com
Hi Gary,

It should work for both mac and windows (by "it" I mean "conda install -c mwcraig vpython") but win 64bit won't work until some time on Thursday.

Turns out I've got the best motivation there is -- enlightened self-interest. Our department adopted matter & interactions a couple years ago, uses python extensively in some sophomore-level courses and several of us use it in research.

For research, anaconda is strongly preferred over python.org, and windows can get confused if you try to use both anaconda and python.org...and many of our students have windows laptops.

Matt



Steve Spicklemire

unread,
May 29, 2014, 4:50:04 AM5/29/14
to vpytho...@googlegroups.com, Steve Spicklemire
Thanks Matt,

I followed your instructions on MacOSX (10.9) and it worked with 'pythonw'.

Not sure why pythonw is needed with anaconda, but not the python.org version.

Thanks for your efforts!

I need to get educated about this so I can sort out how we should document this at vpython.org. Did you have to create custom binaries for all the specific dependencies of vpython (e.g., wxPython, polygon, boost, etc.?) or were you able to use ports that were already part of anaconda? I'm not clear on how binstar works. Did you post the binary packages there and then conda finds them via the '-c mwcraig' flag?

thanks!
-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.

John

unread,
Jun 1, 2014, 2:23:37 PM6/1/14
to vpytho...@googlegroups.com
Hi Matt

   I installed the new Version 2.0 of Anaconda that just came out the other day for my 32 bit windows machine. After that I was able to execute the command

    conda install -c mwcraig vpython

and it installed on my machine. However, when I tried the following vpython command I got an error message.

   import visual
   b = visual.box()

The error message said " Python.exe has encountered a problem and needs to close."

The same thing happens in the ipython notebook if I try the following command.

from visual import *

or 

import visual

Do you know if this should work with Version 2.0 of Anaconda?

John 

Matt Craig

unread,
Jun 1, 2014, 2:30:47 PM6/1/14
to vpytho...@googlegroups.com
Hi,

I'm not sure -- can you try on your 64 bit machine? I uploaded a 74 bit version yesterday. 

I'll try the 32 bit build in anaconda2 later today

Matt

Sent from Mailbox

Matt Craig

unread,
Jun 1, 2014, 3:17:19 PM6/1/14
to vpytho...@googlegroups.com
Hi Steve,

I made conda "recipes" (I.e. Build scripts) for boost, fonttools, ttfquery, polygon2 and vpython.  I'll have those updated on github and do a pull request for them onto Fonda's main recipe repo once I get the 32 and 64 bit windows recipes merged in some sensible way. The Mac recipe also applies patch to setup.py to link against anaconda's python. If you look at my github account mwcraig in the repo conda-vpython-recipes you can the,  

Binstar hosts conda packages, which are built versions of the recipes, with separate builds for Mac, Linux (haven't done these), win32 and win64. 

The -c mwcraig has conda look in my "channel" on binstar. 

Matt

Sent from Mailbox

Matt Craig

unread,
Jun 1, 2014, 4:42:38 PM6/1/14
to vpytho...@googlegroups.com
John,

I just tried the conda recipes in anaconda 2..0 on my 32bit win7 machine and had no problems...

Matt

John

unread,
Jun 2, 2014, 8:02:44 AM6/2/14
to vpytho...@googlegroups.com
Hi Matt

I tried it on my 64 bit machine and it works. To get it to work in Ipython Notebook I used the following commands in the notebook cells.

%pylab wx

import visual

s = visual.sphere()

Thanks very much

John

Matt Craig

unread,
Jun 2, 2014, 11:18:13 AM6/2/14
to vpytho...@googlegroups.com
Hi John,

Thanks for the feedback, and glad to hear it works!

Matt

Rod Holland

unread,
Aug 24, 2014, 2:31:11 PM8/24/14
to vpytho...@googlegroups.com
works for me - thanks a lot

Rod Holland

unread,
Aug 24, 2014, 2:33:47 PM8/24/14
to vpytho...@googlegroups.com
to provide a bit more detail:

I am running anaconda 1.9.2 32 bit on win7-64
I used the command:
conda install vpython -c mwcraig

Gary Pajer

unread,
Aug 29, 2014, 6:27:25 PM8/29/14
to vpytho...@googlegroups.com
Problem on OS X 10.9

I had to upgrade to OS X 10.9,  and the recipe that worked on my old 10.7 computer has a problem.
I installed a new plain Anaconda, python 2.7,  and did:

conda create -n vpy anaconda 
activate vpy                
conda install -c mwcraig vpython

then: pythonw, and the interpreter starts.
but:  sphere() pops a VPython window, blank, and I get the spinning beachball.   I have to Force Quit.

Any ideas or hints?

~-~-~


Bruce Sherwood

unread,
Aug 29, 2014, 6:54:01 PM8/29/14
to vpytho...@googlegroups.com
Gary, it sounds like you're trying to run a VPython program one statement at a time in the shell, which won't work with VPython 6 (at least not without some machinations that Steve invented -- see very recent discussions about this).

Steve Spicklemire

unread,
Aug 29, 2014, 6:59:46 PM8/29/14
to vpytho...@googlegroups.com, Steve Spicklemire
Hi Gary,

If you like you might want to try a simple command line test of basic functionality:

$ python -c 'import visual; visual.sphere()’

-steve

On Aug 29, 2014, at 6:54 PM, Bruce Sherwood <bruce.s...@gmail.com> wrote:

> Gary, it sounds like you're trying to run a VPython program one statement at a time in the shell, which won't work with VPython 6 (at least not without some machinations that Steve invented -- see very recent discussions about this).
>
>
> --
> 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.

Gary Pajer

unread,
Aug 29, 2014, 11:03:09 PM8/29/14
to vpytho...@googlegroups.com
Yeah, that works.  Thanks.   I wasn't (still aren't) familiar with the VPython 6 changes.

~-~-~


You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/qMyvWsjyJKs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Bruce Sherwood

unread,
Aug 29, 2014, 11:15:54 PM8/29/14
to vpytho...@googlegroups.com
For what it's worth, see http://vpython.org/contents/new_features.html, though it doesn't say explicitly anything about the shell issue.

kirby urner

unread,
Nov 1, 2015, 5:02:12 PM11/1/15
to VPython-users
Here I am over a year later, following this thread:

Extracting packages ...
[      COMPLETE      ]|###################################################| 100%
Linking packages ...
[      COMPLETE      ]|###################################################| 100%
#
# To activate this environment, use:
# $ source activate vpy
#
# To deactivate this environment, use:
# $ source deactivate
#
mackurner:~ kurner$ source activate vpy
discarding /Users/kurner/anaconda3/bin from PATH
prepending /Users/kurner/anaconda3/envs/vpy/bin to PATH
(vpy)mackurner:~ kurner$ conda install -c mwcraig vpython
Fetching package metadata: ......
Solving package specifications: ........
Error: Unsatisfiable package specifications.
Generating hint:
[      COMPLETE      ]|###################################################| 100%


Hint: the following packages conflict with each other:
  - vpython
  - python 3.4*

Use 'conda info vpython' etc. to see the dependencies for each package.

Is it just the version number is out of sync?

Kirby

Bruce Sherwood

unread,
Nov 1, 2015, 5:11:50 PM11/1/15
to vpytho...@googlegroups.com
I don't follow some of this but I can immediately point out that there isn't a VPython for Python 3 because there still isn't a release of wxPython for Python 3.

Matt Craig

unread,
Nov 1, 2015, 5:12:47 PM11/1/15
to vpytho...@googlegroups.com
Hi,

The problem isn't specific to the anaconda build...it is that one of the key dependencies of vpython, wxpython, does not have a python 3 release. 

There is port of wxpython for python 3 being developed, but it is moving slowly [1] (that isn't a criticism, just an observation).

The error you are getting is because vpython builds are only available for python 2.

Matt Craig



Sent from Mailbox


kirby urner

unread,
Nov 1, 2015, 9:58:07 PM11/1/15
to vpytho...@googlegroups.com
OK, I appreciate the clarification.  I understand now.

The cool thing about anaconda is it doesn't disturb my existing Python installations, one of which does include the Vpython package.

Thanks for the quick replies.  I look forward to a day when vpython is included in some standard 3.x anaconda distro.

Kirby

Matt Craig

unread,
Nov 1, 2015, 10:34:13 PM11/1/15
to vpytho...@googlegroups.com
The other nice thing about anaconda is that you can create environments so that you can spend most of your life in python 3 but make an environment for vpython that is python2.

Matt

kirby urner

unread,
Nov 1, 2015, 11:09:29 PM11/1/15
to VPython-users


On Sunday, November 1, 2015 at 7:34:13 PM UTC-8, Matt Craig wrote:
The other nice thing about anaconda is that you can create environments so that you can spend most of your life in python 3 but make an environment for vpython that is python2.

Matt




Thank you for that reminder! 

I just had to check the docs on how to specify a different version of Python:

conda create -n vpy python=2.7
source activate vpy
pythonw -c 'import visual; visual.sphere()'



Everything went smoothly after that.  This was on a Mac running OSX 10.7.5.


Reply all
Reply to author
Forward
0 new messages