Enable Visual Studio Code to seamlessly identify the correct runtime for your project, letting you leverage the security and compliance features inherent in the ActiveState project within your integrated development environment (IDE).
Before using your ActiveState project’s Python interpreter in your VS Code environment, make sure the following conditions are met:
state update
. If you have installed the State Tool after opening VS Code you will need to restart VS Code for the changes to take effect.The following will help you integrate Visual Studio Code with your ActiveState project.
Begin by creating a Python file in your project, or opening an existing Python file. If this is a new file you may be prompted to select an interpreter, or if it is an existing file you can select a new interpreter using the VS Code Command Palette.
To access the “Select Interpreter” drop-down from the Command Palette
This will automatically generate a list of all of the interpreters currently available on your machine (including those provided by ActiveState). Click to select your preferred interpreter and begin working on your file.
After making your selection your new interpreter will be displayed at the bottom of the VS Code window (“andrewd-activestate/PythonWindows3’:ActiveState” shown above).
If your ActiveState Python interpreter is not immediately available in the “Select Interpreter” dropdown:
python.activeStateToolPath
under the “Settings” list.$PATH
or %PATH%
variable. To enter the absolute path to the State Tool’s executable go to File > Preferences> Settings and search for ”State Tool”. Enter the absolute path to the State Tool executable in the field shown.state projects