Problem:
Your initial installation (executing the downloaded .MSI file) appears to run ok, but the Canopy shortcut in the Start menu seems to do nothing.
Likely causes:
Note: Multiple Python installations can co-exist on a system, but it is important to keep them isolated (no Python should be set as default or referenced in any environment variable, at least not when any other Python is running).
1) You have a non-ASCII user name. Please see this article: https://support.enthought.com/entries/23707691-Canopy-GUI-requires-extra-setup-steps-when-user-s-home-path-contains-non-ASCII-characters
or
2) Your PYTHONHOME or PYTHONPATH environment variables are set inappropriately from another Python installation. Please read the rest of this article.
or
3) Your PATH environment variable references another Python installation. Please read the rest of this article.
or
4) The canopy_runtimes.json file on your system may be corrupted - resulting in a "No JSON value could be decoded" error. Note, this error will only be seen when starting the canopy-script.pyw script with the -d flag as shown in the test below.
Test:
To test whether (2) is the source of the problem, please restart your computer, then try these commands from a Windows command prompt (when Canopy is not already running):
path set set pythonpath= set pythonhome= set pythonpath set pythonhome cd "%localappdata%\enthought\canopy\app\" _python.exe canopy-script.pyw -d
Notes:
- These are 8 separate commands (in particular, the 2nd command is just set).
- Do not omit the "=" signs at the ends of the two commands that use it.
- Do not type any spaces or other characters before or after the "=" signs.
- For 32-bit Canopy, replace "canopy\app" with "canopy32\app".
- If you installed canopy for all users (including for a Managed Common Install), replace "%localappdata%" with "%programfiles%" (or wherever you installed Canopy).
If this does start Canopy, then PYTHONHOME and/or PYTHONPATH are indeed your problem. See the next section.
If this still does not start Canopy, but you can see from the output of the "path" command that your PATH environment variable references another Python installation, please remove the other Python installation from your PATH environment variable. (Multiple Python installations can co-exist on a system, but it is important to keep them isolated, i.e. none should be set as default or referenced in any environment variable). See the next section for instructions.
Otherwise, please copy the entire contents of the command prompt window (including all scrolled text) to your clipboard. Please copy as text, not as a screen shot -- see this article for instructions. Paste this text into an email and send it to us at canopy.feedback@enthought.com. Please also summarize the problem that you are having, at the top of your email.
Solution:
Remove the PYTHONHOME environment variable, ensure that your PYTHONPATH environment variable only points to your own code development directories, not to any packages installed in any Python installation, and that your PATH environment variable does not point to any other Python installations. For details about these environment variables, and techniques for editing / removing them, see "How do I set PYTHONPATH and other environment variables for Canopy?".
If clearing any references to PYTHONHOME and PYTHONPATH did not fix your problem then please try the following:
cd %USERPROFILE%
del /q .canopy_runtimes.json
After deleting this file, please restart Canopy.
Thanks, Jonathan.
Because many of us would have started with other IDEs like PyScript and Eclipse, the environment variables are set in the process of installing those tools. It does not occur to us to find the reason why Canopy does not launch. Your tip helps to resolve the issue.
PG
I had the same issue and this worked for me.. thank you.
The "5" commands under "Test" appear as 8 separate lines. Is each line a separate command or do some commands continue between two lines?
Duncan, thanks for the feedback, and sorry for the confusion. I have updated the "5" to "8".