Create a Launch Icon for Spyder on Mac

Chella Priyadharshini
2 min readFeb 28, 2018

--

I tried installing Spyder IDE using Homebrew on Mac OSX 10.9 (Mavericks). But wasn’t successful because I wasn’t able to install PyQt5 using the same package manager. It gave me a “SHA256 mismatch” error. After much digging in, I gave up!

So I uninstalled Homebrew fully by giving the following on Terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

Give “y” when it asks for confirmation. Homebrew was uninstalled. But it gave a list of folders that you need to manually delete from the /usr/local/ directory. You can do that later.

Then I installed Miniconda on my system by following the steps mentioned in the link below:

Installing Miniconda on Mac

Now that Miniconda was installed on my Mac, I proceeded to install Spyder IDE by simply typing the following on the Terminal:

conda install spyder

This installed Spyder. But every time I need to open the IDE, I had to open a Terminal window and type “spyder” to launch the application. I wanted to create a launch icon on my Dock for easy access. This is how it can be accomplished:

Create a Launch Icon for Spyder:

On the Terminal get the path of the spyder executable by typing:

which spyder

On my system this gave the path: ~/miniconda3/bin/spyder

Now create a file called spyder in your Applications folder and make it an executable.

touch /Applications/spyder

chmod +x /Applications/spyder

Then paste the following lines of code into it and save it.

#!/bin/bash
~/miniconda3/bin/spyder &
exit

Now drag the spyder exe from the Applications folder onto the Desktop. You can launch Spyder now by clicking on the shortcut icon on the Desktop.

Instead of doing all of the above, you can also directly create a copy of the executable on the Desktop and use that as the launch icon too.

cp ~/miniconda3/bin/spyder ~/Desktop

Now by double-clicking on the spyder exe on the Desktop you can launch Spyder.

To give the exe icon an image:

  • From the Finder window, press Cmd + Shift + G to get the Go To Folder pop-up.
  • Paste the following path in it: ~/miniconda3/lib/python3.6/site-packages/spyder/images.
  • Scroll down to the spyder.png image.
  • Open this image in the Preview app.
  • Press Cmd + C to copy the image to the Clipboard.
  • Now right click on the spyder exe shortcut that we created on the Desktop.
  • Go to Get Info.
  • Click on the empty icon image on the top left corner of the Get Info pane.
  • Press Cmd + V to paste the icon image from Clipboard.

(Image Copyrights belong to The Scientific PYthon Development EnviRonment)

Originally published at techsupportallbugs.wordpress.com on February 28, 2018.

--

--