Resolved in Canopy version 2.1.8 - released March 7th 2018
Canopy fails to start on various Linux systems with an error similar to:
The Canopy Graphical User Interface (GUI) requires the library libpng, which in turn requires the library zlib for handling compression/decompression related issues. The error encountered, which prevents the Canopy GUI from starting, occurs if libpng requires a newer version of zlib than that which is provided from the Canopy installation.
This issue has been fixed as of Canopy 2.1.8. The most recent version of Canopy can be found at https://store.enthought.com/downloads/
Users of older versions of Canopy are recommended to update to the most recent release if possible. However, if updating Canopy is not an option, the following workarounds may help you resolve this problem:
Temporary Workaround if you do not require the GUI:
If you do not require the GUI, you can still use the python distribution provided by Canopy through the command line by using the Enthought Deployment Manager (EDM)
Temporary workaround to enable the GUI:
First, you'll need to locate your system installation of zlib and ensure it is at minimum version 1.2.9. There will be a file named libz.so.1.2.x, so double check that this is equal or newer than 1.2.9. If this library file does not exist or is too old then use your system package installer (apt, yum, zypper, etc...) to install or update zlib. The location of this system library may differ depending on the type of Linux you are using. See the section below for possible locations.
Second, you'll need to locate the path that Canopy looks for zlib within its installation directory. This should be similar to $HOME/Canopy/appdata/your-canopy-version-/lib. For example: $HOME/Canopy/appdata/canopy-126.96.36.19995.rh6-x86_64/lib contains a file libz.so.1
Third, you should create a backup of the current symlink by executing the following in the command line making sure to put the proper path to your canopy lib in the first command:
mv libz.so.1 libz.so.1.back
Finally, you'll need to create a new symlink to the system libz installation by executing the following in the command line making sure to put the proper path to your system lib in the first file name:
ln -s path/to/system/libz ./libz.so.1
At this point you should be able to start Canopy and have the GUI load properly
Possible Locations of zlib:
- Ubuntu - check /usr/lib/x86_64-linux-gnu/ for libz.so.1
- OpenSUSE and CentOS/RHEL - check /lib64 or /usr/lib or /usr/lib64 for libz.so.1
- Other Linux variants - will need some trial and error to locate libz.so.1, however its worth checking in the paths listed above.