In Canopy version 2, after you tell the Package Manager to install, remove, or update any packages in your Python environment, Canopy shows you the following warning and gives you an opportunity to cancel the operation:
"To maintain the integrity of your Python package installation, Canopy will kill your Python kernel process and its live data, before installing these packages."
This behavior is intentional, to avoid situations where the kernel process holds a lock on files that need to be deleted or replaced.
The question to ask yourself is whether it would be a problem for Canopy to kill your live data. If so, cancel the Package Manager operation and save the data in Canopy's IPython panel before repeating the operation.
Usually, killing the live data will not be a problem.
Your live data is a transient collection of variable values that have accumulated as you experiment at the IPython prompt with interactive commands and running Python scripts. After you update your packages you'll usually want to start with a clean slate anyway.
IPython remembers the history of the commands that you've typed at the IPython prompt, so after updating your packages you'll be able to recall the commands that you wish to repeat. See "Search command history" in the IPython documentation. You may also find "Session logging and restoring" useful.
However, there may be times when killing live data without saving it would be a problem.
Perhaps you have written significant data to files that have not yet been closed. Be sure to close these files before the kernel is killed.
You may have computed significant data that you have not yet saved to any file. If you have a usual method of saving your data to files, use this (and then close your files). Or you can use IPython's
%store magic for lightweight persistence of your data.
Please do not enter support requests in article comments
Please use article comments for suggestions to improve the article. For individual support requests, please follow these guidelines.