It is recommended to create a new environment for each project and leave the base environment untouched.
In the following, we assume the environment name is cs101
.
See Miniforge for more information.
For Linux and macOS:
1
2
|
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
|
1
|
conda config --set auto_activate_base false
|
Add the following lines to settings.json
:
1
2
|
"python.condaPath": "~/miniforge/condabin/conda",
"python.defaultInterpreterPath": "~/miniforge/envs/cs101/bin/python",
|
1
|
conda install -y numpy matplotlib scipy pandas sympy jupyterlab ipykernel ipywidgets pytest numba plotly
|
In this way, the package will be installed in the current environment and the changes will be reflected immediately.
1
|
conda remove -n cs101 --all
|