Linux: Canopy Terminal cannot be opened from Canopy Tools menu on some systems

The "Canopy terminal" command in the Canopy Tools menu, where implemented (on Windows, Mac, and some Linux desktop environments) is a convenience for opening a regular terminal session in which Canopy Python has been activated (i.e. put on the PATH).

Given the diversity in Linux desktop environments, the Canopy Terminal command won't work in all cases. Instead, you can put Canopy's Python environment location on your PATH in your terminal of choice, either persistently or via an alias.

In Canopy 2 on Linux, the location of the Python environment is, by default:

The easiest way to put this on your path is with this command:
source ~/.local/share/canopy/edm/envs/User/bin/activate 

Another useful tip is to create a shell command alias for the command listed above so that you can start a Canopy Terminal as needed. Assuming you are using Bash as your shell, add the following command to your .bashrc file, usually located at $HOME/.bashrc

alias canopy_terminal='source $HOME/.local/share/canopy/edm/envs/User/bin/activate'

Now after restarting your terminal, you will be able to start a Canopy Terminal simply by executing the command canopy_terminal.

For users of other shells such as zsh, you'll need to create the alias using the appropriate syntax for your shell in the correct file such as $HOME/.zshrc.

Also, we would appreciate your informing us, via the comments below, what Linux distro and what desktop environment / terminal you are using.

Have more questions? Submit a request


Powered by Zendesk