A Visual Studio Code extension that discovers and displays your micromamba environments, seamlessly integrating with the Python Environments extension.
Features
Automatic Discovery: Finds all your micromamba environments, whether they are global (in $MAMBA_ROOT_PREFIX/envs) or local to your workspace.
Workspace-Aware: Workspace-local environments are prioritized and listed first for easy access.
Real-time Updates: Watches for changes and automatically refreshes the list when you create or delete an environment.
Micromamba: Must be installed and configured in your shell environment. The extension relies on:
The ~/.conda/environments.txt file to locate your environments.
The MAMBA_ROOT_PREFIX environment variable to detect the environment type (e.g., Workspace vs. Named).
Important: Activating the Python Environments extension
The Python Environments icon may not appear in the Activity Bar due to its ongoing rollout. If you don't see it, you must enable it manually by adding the following line to your User settings.json file:
"python.useEnvironmentsExtension": true
This is a temporary requirement until the rollout is complete. (cf. note)
Installation
Open Visual Studio Code.
Go to the Extensions view (Ctrl+Shift+X).
Search for Micromamba Environment Provider.
Click Install.
Known Issues
Debugger Activation on Linux: There is a known issue on Linux where the Python debugger may launch before the micromamba environment is fully activated. This can cause errors if your code relies on packages or environment variables from that environment. For more details, please follow the discussion on [GitHub Issue #934](https://github.com/microsoft/vscode-python-environments/issues/934).
Contributing
Contributions are welcome! Please feel free to open an issue to report a bug or suggest a feature. If you want to contribute code, please open a Pull Request.
Development
To get started with development:
Clone the repository:
git clone [https://github.com/symzn/vscode-micromamba-env.git](https://github.com/symzn/vscode-micromamba-env.git)
cd vscode-micromamba-env
Install dependencies:
npm install
Compile the code:
npm run compile
You can also run npm run watch to automatically recompile on file changes.
Launch in Debug Mode:
Press F5 in VS Code to open a new "Extension Development Host" window with the extension running.
You can now test your changes in this new window.
License
This project is licensed under the MIT License. See the LICENSE file for details.