pythongoanacondavirtualenv

Can Anaconda be used to create virtual environments for Go?


Anaconda is a powerful and popular toolkit normally associated to Python development. Its snake-name is probably chosen to remind of Python, but the feeling I get using it, is that all it does is handling virtual environments, pre-installing useful Python libraries, tools and packages, and then (and probably most importantly) dealing with dependencies and installations.

Can I set Anaconda up to create virtual environments for Go, too?

From the fact Anaconda can install Go, I get to think it's actually possible, but then I also get the feeling all dependencies-solving power of Anaconda is probably made thinking of Python only.

...Can it be done?


Solution

  • I also get the feeling all dependencies-solving power of Anaconda is probably made thinking of Python only.

    Absolutely not. Anaconda installs Conda. Conda is a package and environment manager, and not just for Python, but also for R, Julia, Perl, Scala, etc... including Go.

    You will need to create a new environment if you want to run Go:

    conda create --name go --channel-name conda-forge go
    

    Then move to the new environment to run go using:

    conda activate go