Toothpick Anemone
Toothpick Anemone

Reputation: 4644

What files does a Spyder shortcut target?

This is assuming your OS is Windows.

If you:

  1. right-click on a shortcut
  2. left-click "properties"
  3. left-click in the text field labeled "target"
  4. press Ctrl-A then Ctrl-C to copy
  5. open a text editor. press Ctrl-v to paste.

What paths do you get?

I installed Spyder using pip

I created a desktop shortcut manually, but chose the wrong executables. When I launch Spyder via the shortcut, the GUI is mostly just a big black rectangle. It does not work. The shortcut I made points to:

"D:\Program Files\Python36\pythonw.exe"
"D:\Program Files\Python36\Scripts\spyder3.exe"

I realize your drive letters, etc... might be different. It's just the .exes I care about.

Upvotes: 2

Views: 1051

Answers (1)

Rory Daulton
Rory Daulton

Reputation: 22544

I use the Anaconda3 installation, which automatically installs Spyder3 together with Python, and installed to my D: drive rather than the default location. With that in mind, I use the program menu item to open Spyder, which uses the command

D:\Anaconda3\pythonw.exe D:\Anaconda3\cwp.py D:\Anaconda3 D:\Anaconda3\pythonw.exe D:\Anaconda3\Scripts\spyder-script.py

This opens Spyder3 without any noticeable black box. You should be able to modify this to your needs, but first check to see if you already have a shortcut in your program menu structure. If not, consider installing Anaconda rather than the default Python installation. That solves many of the problems that come up when using Python in Windows and would solve your current problem as well.

I also set up Windows to open a .py file by loading it into Spyder. Soon after installing Anaconda with Spyder I double-clicked a .py file, and when the resulting dialog box asked me the program to use I pointed to

D:\Anaconda3\Scripts\spyder.exe

This opens a small black box, which eventually closes, with Spyder opening soon after with the file loaded in the editor. This then automatically happens whenever I double-click a .py file.

Upvotes: 2

Related Questions