NSI-DEV
- This extension is meant to get the students started quickly with python development on VSCode, without messing around with the base environment that won't show up in the view, and with basic extensions installed
- For windows users, it handles MSYS2 terminals, in order to give the students a taste of the linux command line.
- In order to work, it mainly relies on the
python.condaPath
setting, which it tries to guess if not properly set.
It comes with restrictions as it is made for educational purposes. It doesn't show the base environment. It forces the default terminal to 'Command Prompt' on windows, as issues often arise with powershell.
It does not rely on any OS environment variables, nor does it rely on the python extension's template, mainly for maintainance purposes.
conda init
doesn't have to have previously been executed on any shell.
Features
- Creates and deletes conda environments.
- Lists installed packages and versions in each environment.
- Opens a terminal with an chosen activated conda environment.
- Opens a regular terminal
- conda update, cleaning and purging (under the hood while removing an environment)
Note: The extension does not change the workspace's python environment, you still have to do this the regular way at the bottom right corner of VSCode's window.
Note: On windows, terminals are MSYS2 MINGW64 terminals if MSYS2 is installed at the default location. This default behaviour can be modified in the settings.
Requirements
- Miniforge3 installed
- (Optional for Windows users) MSYS2 installed
On windows, in the command prompt:
winget install CondaForge.Miniforge3
winget install MSYS2.MSYS2
Extension Settings
Relies on python.condaPath. If not set, tries to set it to a default miniforge installation.
If the extension can't find your conda installation, wether it's miniforge or not, please set the python.condaPath
setting according to your specific configuration.
As for MSYS2, the setting nsi-dev.MSYS2Path
must be set to the MSYS2's installation folder. Defaults to C:/msys64
nsi-dev.MSYS2Enabled
must be checked in order to use MSYS2. Checked by default.
Known Issues
- If nothing shows up in the view, it's probably because you need to create an environment.
- On some rare windows computers, python.condaPath is not guessed properly. In this case, it has to manually be set for now.
Release Notes
1.0.0
- Jupyter removed from environment creation options.
0.1.1
Bug fixing:
- MSYS2 config parameter not properly retreived
- Using conda info -e --json instead of conda env list to properly prevent the base environment from displaying
0.1.0
Initial release.
Enjoy!