Using Enthought Python / EDM with VS Code on a Mac

This article supplements either Enthought training class setup instructions, or the article Using the Enthought Deployment Manager (EDM) with the Visual Studio Code (VS Code) IDE

 

Install the Enthought Deployment Manager (EDM)

Recent EDM installers for the Mac are not signed. This is because of changed Apple signing procedures, which we have no current plans to implement.

If you have admin rights to the machine, we recommend that you install the latest version. One method is to right-click on the downloaded .pkg file, click Open, then "Yes" to "are you sure?" Or you can install EDM 2.1.0 which is signed with Apple's previous procedure, and should suffice for many purposes. For the differences, see http://docs.enthought.com/edm/dev/history.html .

Install Visual Studio Code (VS Code)

Microsoft provides the VS Code installer for macOS as a .zip file containing "Visual Studio Code.app"  When unzipping, please drag this application to your Mac Applications folder rather than leaving it in your Downloads folder.

Launch VS Code from a command line, not from icon or Spotlight

It is necessary to launch VS Code from Terminal by typing the command code , rather than from a desktop or dock icon or Spotlight. Note that if you already launched VS Code from an icon or Spotlight, you must completely quit it before restarting it from Terminal, otherwise you are not really restarting it, just switching to it.

By default on macOS, VS Code does not enable launching from Terminal. You can enable this either by following these instructions from Microsoft, or by adding a "soft link" to VS Code in a directory that is already on your PATH. To add such a link, copy/paste the following long command into a Terminal, then enter your macOS login password when prompted:

sudo ln -s "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" /usr/local/bin/code

Whichever way you enable it, you can then launch VS Code by opening a Mac Terminal window and entering the following command:

code

or, if you also have conda installed on your system:

conda deactivate
code

 

Please do not enter support requests in article comments

Please use article comments for suggestions to improve the article. For individual support requests, please follow these guidelines.

Have more questions? Submit a request

Comments

Powered by Zendesk