- Joined
- Mar 2, 2020
- Messages
- 6
- Reaction score
- 0
good day dear community, i am in the mid of setup the vscode
well i made my very first steps here:
the question is : how would you set up the vs-code to run with python
is creating the venv the better or conda?
the manual notes;
cf. https://code.visualstudio.com/docs/pyth ... vironments
Creating environments
The command presents a list of environment types: Venv or Conda.
a. creating an environment using Venv, the command presents a list of interpreters that can be used as a base for the new virtual environment.
b. creating an environment using Conda, the command presents a list of Python versions that can be used for the project.
which method is more appropiate?
By the way: We also could do it on terminal - this is also an option?
Well in this case i think i have to install a Python interpreter into the conda environment, otherwise one will be installed for us after we select the environment. For example, the following command creates a conda environment named env-01 with a Python 3.9 interpreter and several libraries:
But - is this a good method!?
look forward to hear from you
well i made my very first steps here:
the question is : how would you set up the vs-code to run with python
is creating the venv the better or conda?
the manual notes;
cf. https://code.visualstudio.com/docs/pyth ... vironments
Creating environments
Using the Create Environment command
From within VS Code, you can create local environments, using virtual environments or Anaconda, by opening the Command Palette (Ctrl+Shift+P), start typing the Python: Create Environment command to search, and then select the command.
The command presents a list of environment types: Venv or Conda.
a. creating an environment using Venv, the command presents a list of interpreters that can be used as a base for the new virtual environment.
b. creating an environment using Conda, the command presents a list of Python versions that can be used for the project.
which method is more appropiate?
By the way: We also could do it on terminal - this is also an option?
we can create reate a conda environment in the terminal
Well that said - i think this is another interesting option: In this case the Python extension automatically detects existing conda environments.Well in this case i think i have to install a Python interpreter into the conda environment, otherwise one will be installed for us after we select the environment. For example, the following command creates a conda environment named env-01 with a Python 3.9 interpreter and several libraries:
Code:
conda create -n env-01 python=3.9 scipy=0.15.0 numpy
But - is this a good method!?
- Question if we create a new conda environment while VS Code is running, is this in effect imitiately ?!
- or should i make use of the refresh icon on the top right of the Python: Select Interpreter window;
- I guess that otherwise we may not find the environment there.
look forward to hear from you