Multiple Kernels in Enthought Canopy

Run scripts simultaniously in Canopy

The use-case is clear, but is not yet implemented, though it is getting closer. (Canopy 2.1 can work with multiple different environments, but not yet simultaneously.) I do expect multiple simultaneous running kernels to be available in 2018. Meanwhile, the workaround is the same as before -- develop and test your code in the Canopy GUI, but run your long production runs in Canopy Command Prompts using qtconsole or ipython or plain python.

The current version of Canopy is 2.1.6

FWIW: as a feature request, I'm not sure that this is really an SO-question.

How to stop an execution of python script under Enthought Canopy?

Interrupt Kernel is the normal way; however the nature of Python as a unified interactive environment means that if it's really deep in the execution of a C extension, you have no other way than by Restarting Kernel, losing your existing results, as you've discovered.

On the bright side, your command history is saved, making it much easier to recreate.

Or, if you don't have too many values to recover, and can exercise a pound of prevention, see the ipython %store magic: http://ipython-docs.readthedocs.org/en/latest/config/extensions/storemagic.html

Enthought Canopy does not create .pyc file

This has nothing to do with Canopy per se. It is how Python works in general. Once a module is loaded, it is not reloaded/recompiled if you change it. This can be avoided with reload as suggested in one of the other answers. There were different attempts in the past at having auto-reload mechanism but none of them were particularly robust, causing more troubles than what they solve.

The caching behaviour will happen in any Python session (Canopy, IPython frontends like the notebook, console, etc., a regular python shell, a server process, ...).

There are others ways to workaround the problem. In IPython and Canopy, you can use the !python command to execute your code as if you were on the shell.

Jetbrains PyCharm with Enthought Canopy

In my case (mac) the interpreter path is:

~/Library/Enthought/Canopy_32bit/User/bin/python

I also had some trouble getting PyCharm and Canopy to work well together when Canopy was new. Now with version 1.3 I haven't had trouble -- the two work together seamlessly.



Related Topics



Leave a reply



Submit