(Revised July 16, 2014)
Summary: Canopy will be unable to complete its environment setup during first launch, if your home directory permissions are damaged. You will need to fix these permissions to allow both read and write access to your home directory. Fixing them may also allow other seemingly broken applications to install or run again on your system.
The first thing to try is restarting (rebooting) your computer, to eliminate the possibility that this is due to a transient problem on your system. If that fails to solve the problem, read on...
Except in rare circumstances, users should have full read and write permissions to their own home directory. Another symptom of corrupted permissions is if you are prompted to enter your machine's login credentials any time you want to make a change in this directory.
In Canopy 1.3, the error is usually of the form:
Failed to setup your environment - v1.3.0 (mac-64bit) Traceback (most recent call last): File "build/bdist.macosx-10.5-i386/egg/canopy/app/bootstrap.py", line 2068, in main File "build/bdist.macosx-10.5-i386/egg/canopy/app/bootstrap.py", line 2006, in create_bootstrapper File "build/bdist.macosx-10.5-i386/egg/canopy/app/bootstrap.py", line 404, in __init__ File "build/bdist.macosx-10.5-i386/egg/canopy/app/bootstrap.py", line 589, in _check_and_change_env_paths File "build/bdist.macosx-10.5-i386/egg/canopy/app/bootstrap.py", line 695, in _check_and_prompt_venv_install_location File "/Applications/Canopy.app/appdata/canopy-220.127.116.115.macosx-x86_64/Canopy.app/Contents/MacOS/../lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/Users/<username>/.canopy'
and, as mentioned earlier, occurs during the first attempt to start Canopy after the initial installation.
During installation, setup, and even at a few times during operation, Canopy will need to have write access to your home folder. For users of OS X 10.7 (and later), resetting these permissions is rather simple and is accomplished by following these steps:
- Start by booting from the Recovery HD partition. You can do this by restarting your Mac while holding down the command (⌘) + r keys. Keep holding the two keys until you see the Recovery HD desktop appear.
- You will see the OS X Utilities window open on your desktop, with various options available in its window. You can ignore this window; there's nothing we need to do with it.
- Instead, select Terminal from the Utilities menu at the top of the screen.
- In the Terminal window that opens, enter the following command: resetpassword
- After the Reset Password window opens, select the drive that contains your home folder; this is usually your Mac's startup drive.
- Use the drop-down menu to select the user account whose home folder permissions you wish to fix.
- DO NOT enter any password information. DO NOT click the Save button.
- Instead, click the Reset button located just below the "Reset Home Folder Permissions and ACLs" text.
- The process may take a while, depending on the size of the home folder. Eventually the Reset button will change to say Done.
- Quit the Reset Password utility by selecting Quit from the Reset Password menu.
- Once you quit the Reset Password app, be sure to quit the Terminal app by selecting Quit Terminal from the Terminal menu.
- From the OS X Utilities menu, select Quit OS X Utilities and confirm. Then click the Restart button.
These instructions were based on steps provided on this website. For more information and instructions for earlier versions of OS X, please see refer to the link.
You should now be able to install launch Canopy and set up your environment.