I created a virtual environment using miniconda. I'm using Visual Studio Code with Mask rcnn, but I can't start the virtual environment in Visual Studio Code, I get an error.Sevinirim

Please read this: https://py-vscode.readthedocs.io/en/latest/files/venv.html#selecting-switching-between-the-environments-in-vs-code
Press ctrl+shift+P to open VS Code’s command palette.
Type interpreter in the search box. And select the Python: Select Interpreter option. You should see a list of all the available (both conda and virtual environments are shown) python environments. You should also see your recently created myenv environment there. Toggle and select your environment and you are good to go.
After ctrl+shift+P

Select conda env from a list

You are getting this error because conda activate env-name won't work in a VS Code Powershell (PS) terminal. When opening terminal in Windows VS Code, this is typically the default terminal shell.
A couple solutions:
From VS Code doc's: Conda environments can't be automatically activated in the VS Code Integrated Terminal if the default shell is set to PowerShell. To change the shell, see Integrated terminal - Terminal profiles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With