Search code examples
virtual-environment

Virtual Environment on a Mac without Python


I wondering if there is a way to create a virtual environment on a Mac, but not for Python development (which is the only thing I found on Google). For example, If I want to install Golang / NodeJS but I don't want it to be installed "locally" but on a virtual environment, so when I delete it, it also deletes whatever was installed there. Is it somehow possible? I know about VirtualBox and VMWare, but I'm looking for something like the Python's virtualenv, but for general purposes.


Solution

  • Not sure if there are any generic one's out there (never found any). However there are community maintained Go and Node environment managers out there.

    • For Go, goenv is an option
    • For Node, nodenv can be used

    There might be a lot of other community-maintained packages out there, I am just sharing the two I have used in past and they worked.