Hey #Fedi, can you help me with a #Python environment pain-point?
TL;DR : I want global #virtualenv 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?
@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.
@gisgeek yeah, that's what I was doing and it's too much friction, IMO
This seems much better: https://misskey.io/notes/a3n2yckzpyua0j5p
@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”
https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html
@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).