1

Is it possible to use a different IDE as a front end while using the Canopy EPD engine in the back end? In particular, I'd like to use mayavi.mlab scripting from Spyder's ipython interpreter. I'm working on a macbook pro running OSX 10.8. Is there a way to set this up?

I have tried to set up mayavi and spyder using macports, but that does not seem to work. The only working version of mayavi that I have managed to set up runs from the commercial Canopy platform. So if I can't get the macports mayavi to work with the macports spyder, I am hoping to get the Canopy mayavi working with spyder.

Thanks.

Adrian

2 Answers2

2

(Spyder dev here): This is what you need to do:

  1. Run this command in a console

    enpkg ipython update
    
  2. Go to

    Spyder > Preferences > Console > Advanced Settings > Python Executable
    
  3. Select the option

    Use the following interpreter
    

    Note: This option is not available right now but it will be in 2.2.3. If it's not, then just the text field present there.

  4. Put there the full path to Canopy's Python version, which you can get with these commands inside Canopy:

    In [10]: import sys
    
    In [11]: sys.executable
    Out[11]: '/home/carlos/Enthought/Canopy_64bit/User/bin/python'
    
Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
1

Maybe I'm missing what you want to do (I don't even know what mayavi is), but here's something you can try. I'm using Spyder (version 2.2.1 ) with the Canopy EPD distribution (version 1.0.3) Try doing this:

1) At the command line, update ipython with the enpkg command ( "enpkg ipython update" should work) In my case, this reverted the ipython to ipython-0.13.1-2 2) Then in Spyder, go to preferences -> Console -> Advanced Settings and in the python executable put something like /Users//Library/Enthought/Canopy_64bit/User/bin/python

Restart Spyder and now you should be able to use the EPD distribution with all the modules you have installed.

cd98
  • 3,442
  • 2
  • 35
  • 51
  • This is a very good option too! The problem is that it'll break Canopy itself (I think). Once everyone is in IPython 1.0, things will be smoother and easier. – Carlos Cordoba Aug 22 '13 at 18:40
  • Buenas @CarlosCordoba. What do you mean by break itself? I don't use the Canopy editor much, but I just tested doing some graphs and it worked out fine. The package manager seems to be working fine too. (I hope they update to 1.0 soon!) – cd98 Aug 22 '13 at 19:21
  • Hola @cd98. I mentioned it because I read a comment from an Enthought employee that Canopy only works with a development version of IPython. After closer inspection, it seems Canopy's Editor manages to use a different IPython version than the one handled by `enpkg` (weird). I'll update my answer. – Carlos Cordoba Aug 22 '13 at 20:49
  • Yep, you're right! Just checked IPython.__version__ on the Canopy editor and it gives '1.0.dev', whereas the enpkg version gives '0.13.1' – cd98 Aug 22 '13 at 22:40