feat(pyenv+pipenv): minimal working pyenv and pipenv setup
Following https://github.com/nushell/nushell/issues/5423
This isn't complete at all but covers all my needs atm.
Should I put export before everything ?
Just a couple of pointers:
- We have official virtualenv integration: https://github.com/pypa/virtualenv/tree/main/src/virtualenv/activation/nushell . I think pipenv uses virtualenv internally but I'm not 100% sure.
- The next release will include the Overlays feature (see https://github.com/nushell/nushell/pull/5375) which is designed to make this sort of stuff more ergonomic (the virtualenv integration will be changed to work as overlay)
- The
exportkeyword is used in modules. You use it if you want to use it as a module, not a script. See modules docs for details how it works: https://www.nushell.sh/book/modules.html#modules.
Oh, also @efugier could you move the file to the virtual_environments folder? We can merge it but I think it could be together with other Python-related stuff so we don't end up having a thousand folders.
Thanks @kubouch!
We have official virtualenv integration
Ok, let's put this on hold while I look into it.
The export keyword is used in modules.
I think of it more of a config extension that would always be loaded, so I use it with exports. It's more a question about this nu_SCRIPT repo and its policy about that.
What I'm doing now when I work with pipenv is to create the env using pipenv python 3.9 and then find the env route pipenv --venv. In that folder you will find the activate.nu file
Hi, very quick note, you might want to change your append to prepend. At least on my system that makes sure that the pyenv shims take precedence over the system version.
Thanks for pointing this out @WizardOfMenlo :slightly_smiling_face:
Haven't had time to come back to this yet, sorry
Has this been abandoned or it's summertime and we're all at the beach? 😆
Has this been abandoned or it's summertime and we're all at the beach? laughing
Ahah I wish!
Sorry @fdncred not much time on y hands atm. Feel free to close this PR if it bother you; I'll re-open it eventually :confused:
Have we seen any resolution on this yet to facilitate pyenv integration? It seems like it might be available, but not clear on use: https://github.com/pyenv/pyenv/pull/2524