floss.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
For people who care about, support, and build Free, Libre, and Open Source Software (FLOSS).

Administered by:

Server stats:

681
active users

Silmathoron ⁂

Hey , can you help me with a environment pain-point?

TL;DR : I want global management

I've been using virtual environments for quite some time, but I might be missing some standard feature because switching env is a pain: I have to be in the right folder (where the venv dir was created) or manually configure a shell script.
Is there a tool that can provide me with the equivalent of ``envswitch envname`` regardless of the folder I'm in?

#venv#poetry#pipenv

@silmathoron I'm not sure if this is what you intend, but if you had a single general environment directory in your home with one sub-dir per venv, you could quickly write a silly bash script to switch from one $VIRTUAL_ENV to another just by parsing that bash variable.

@silmathoron
You can also use miniconda (a minimalist conda) to do this. It is completely compatible with pip. What I generally do is select the version of python I need via conda to create the environment and then install my packages via pip. Then you can switch via “conda activate name-of-environment”

docs.conda.io/projects/conda/e

docs.conda.ioInstalling conda — conda 25.1.1 documentation

@alexmilowski ah, right! I'm not used to working with conda, so I did not think about it, but you're right, that's definitely the feature I'm looking for!
Should maybe look into it again...

@silmathoron have you looked into using pyenv? Especially using it with pyenv-virtualenv (which come with it by default).

github.com/pyenv/pyenv