
Debugging, Visual Studio Code, “ Debugging“ Finally, I note the commands and the standard usage for creating virtual environments in conda.Darren1231, Pixnet, “ Anaconda + visual studio code“ Creating a virtual environment with condaįor more information on the Execution Policy, please see the following. In fact, it will appear if you type as far as “Interpr.”įor more information on the Execution Policy, please see the following. Figure 5: Command palette display and interpreter switching in VSCode. This will allow you to switch to a virtual environment.īy the way, to switch the Python interpreter on VS Code, open the command palette by pressing “ Ctrl + shift + p” and search for “Interpreter.” You will see “ Python: Select interpreter,” select it and choose the environment you want. Figure 4: Review and modify execution policies on PowerShell (Japanese ver.) Note, however, that the PowerShell terminal must be running as an administrator. Therefore, it is necessary to set the execution policy to “ RemoteSigned” by continuing to execute the following command. In this state, I tried to install OpenCV using conda and typed from the terminal as follows. Figure 2: The Python extension in VS Code In addition, I have introduced a Python extension to Visual Studio Code. Anaconda Python environment already installed.The execution environment was as follows.

It seemed to be caused by the problem that the “conda” command was unavailable. I was trying to install the OpenCV library for Python in a virtual environment on Anaconda. In reality, the error text is much longer. Figure 1: Error displayed on the VS Code terminal screen. But then I got an error… I was stuck for a while. I installed Visual Studio Code and Python environment with Anaconda. Problem: I can’t use the conda command in Visual Studio Code…


