Best way to use Anaconda and VScode on Bluefin?

Would love a bullet point description of how you would do it (distrobox, devpod… ?)

When you say, “Anaconda”, do you mean the python distribution or something else? What do you want to do in the end? Run jupyter notebooks?

hey @stego, yes the python distribution.
I’m participating to a workshop this Wednesday and they recommend to install Anaconda and VScode to have a better experience.

So far I created a Ubuntu Distrobox, installed Anaconda with the script, created a python environement, started it.
Now I’m supposed to start the terminal from Anaconda but maybe because I’m in distrobox I don’t get any…

So I fire up VScode and select: Dev containers: attach to running container (as I’ve seen Jorge say to do) hopping I can see my ubuntu distrobox or my python environment newly created…
I’ve never tried this before so maybe there’s a better way to do it…
I appreciate your help!

It’s still not clear how those two will interact. The most mundane explanation is that the workshop organisers expect a lot of Windows users who don’t have Python preinstalled on their machines and just installing Anaconda and VSCode to do regular Python programming is definitely a fast and easy way to get started (although I haven’t tried it myself).

Anaconda is fairly heavy though. I use miniconda instead, which you can install directly on the host system by following the official instructions for Linux using wget. The installation will be confined to the folder ~/miniconda3 and you can uninstall miniconda by deleting that folder.

Important: The official instructions tell you to run one of the following 2 lines:

~/miniconda3/bin/conda init bash
~/miniconda3/bin/conda init zsh

This will indirectly change your $PATH variable, so that your shell will first discover the minconda python interpreter instead of the bluefin python interpreter. This shouldn’t cause any problem in most cases, but you should be aware of it.

Also note that no containers are involved in this setup. I assume VSCode will just look for a python interpreter on your $PATh.

Once you are done with the workshop, delete the ~/miniconda3 folder and also manually clean up your .bashrc or .zshrc (which is easy, because the part that you need to delete is marked as __conda_setup).

1 Like

That’s great @stego ! It works like a charm, thanks a lot, very nice of you :+1: