By default, the Anaconda environment comes with Python version 3.9.13. My question therefore are, is there any way to simply have a single version of VSC (Anaconda), or make the "local" to detect the one from there? Also, can I set git to use VSC from Anaconda as the default text editor?įYI: I found no other way to have VSC than downloading it from its webpage, installing it and then it seems to be avaiable in the Anaconda Navigator straight away. To run the Python file, we need to select the Python interpreter. When prompted, enter y to proceed with the installation. This actually makes sense when I think about it (those environments were created in conda), but I do not understand why I cannot get rid of the "local" version and just install VSCode from Anaconda and, from there, set it to be default text editor for Git. Next, enter the following command: conda install -c conda-forge opencv Once entered, you should see the following output in your terminal. When launching it from "the computer" (not Anaconda), it does not have all those extensions plus I can´t select environments from conda (commands do not exists). Now hit ctrl+shift+p, enter ‘select interpreter’ and choose the python select interpreter and configure. The problem comes when I decided to open VSCode from Anaconda in order to use it for Python.įor instance, when opening from Anaconda, I can use the VSC terminal just like the Conda prompt, and therefore select the virtual environment that I need to use. Go to the Visual Studio and search for Python in extension search bar and install it. Setting VSCode as the default editor was pretty straight forward. So far, I was only using it when willing to add the description of my commits in Git. For different reasons, I recently decided to start using VSCode more generally.
0 Comments
Leave a Reply. |