mamba-org / vscode-micromamba

A VSCode extension to generate development environments using micromamba and conda-forge package repository
BSD 3-Clause "New" or "Revised" License
82 stars 10 forks source link

try to reuse installed `micromamba` and envs #43

Closed way-zer closed 8 months ago

way-zer commented 9 months ago

Environment

  1. node -v: [fill]
  2. npm -v: [fill]
  3. Operating system: Linux

Prerequisite

System already installed micromamba

Steps to Reproduce

  1. install micromamba to /usr/local/bin/micromamba
  2. micromamba create -n example
  3. install the extension

Expected Behavior

The extension is expected to use installed binary first, and search environments inside $HOME/micromamba

Actual Behavior

The extension try to download binary to .vscode-micromamba/micromamba even there is one installed. And can't find environment inside $HOME/micromamba.

Work Around

cd
ln -sd /root/micromamba .vscode-micromamba
ln -s /usr/local/bin/micromamba .vscode-micromamba/micromamba

The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...

corker commented 8 months ago

Thank you for bringing this one in. Unfortunately, too many edge cases would be expensive to cover. This extension goal is to allow developers to create virtual environments after cloning a repo. When Microbamba is already installed in the path, we don't want to have a dependency on the extension. Instead, we have an independent instance of Micromamba in the extension we fully control. Nevertheless, one can activate the external virtual environment with "Micromamba: activate environment by path"