New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python virtualenv support? #852
Comments
I don't believe so. We're currently working on adding environment support, and this is a good test case for the kind of thing we should support. |
So the wait is until |
Not yet. For now, just some pinned issues in the repo. I'll chat with the team to see if we can better present what is priority for reaching 1.0 🙂 |
I imagine this will need to tie into #291 and require engagement from pypa to integrate a nushell script into virtualenv. At the end of the day, venvs just mutate environment variables which is possible/straight-forward to do through nu, but not very ergonomic to do by hand. |
Hi, is there any update on this? The only thing stopping me from using nu full time... |
@cjwyett - we've improved support for environments quite a bit, so it should be possible to support Nushell now from virtualenv. If it's not, we should be close, and I'd be happy to continue adding additional support to help that work. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen. |
Is this fixed? I still can't activate a python venv with |
It's not fixed. Overzealous github bots at it again. Please reopen, @jonathandturner . |
Also this seems like some kind support should be implemented from the virtualenv side, currently the first lines of
which kinda implies that it is not compatible with nushell. |
Some comments from other issues:
|
any news? |
The standalone (For Arch users: the Arch package is outdated and won’t create a working nushell activation script, you need |
The script generated by
|
Which version of |
virtualenv version 20.16.3, python version 3.10.6 Seems to be caused by this: https://www.nushell.sh/blog/2022-08-16-nushell-0_67.html#new-variable-naming-convention-jt |
What is your output when you execute these commands?
|
|
Line 11 of my |
Ah, I guess I have 20.16.3 in my virtualenv but 20.15.1 in my system, and it seems to not overwrite the script when it already exists (but is broken) |
If anyone uses Arch’s |
news? |
When I run my command
🤷 |
@whyboris So, the script that is generated by |
Thank you @jokeyrhyme for the explanation. I don't mind -- I can use Just wanted to report in on this issue -- since it seemed like there was intent to make Is the new verdict that |
Not quite. The script
It’s the other way around. |
Thank you @flying-sheep -- I see the
|
nu changes fast, so old syntax isn’t necessarily supported anymore. You probably need to recreate the scripts with an updated python3.9 -m virtualenv ~/.popo or python -m virtualenv -p python3.9 ~/.popo |
I had to update to virtualenv v20.21.0 to support nushell 0.77.0 |
For those wondering the command you need is |
I dearly wish virtualenv had been opinionated about destination directory names It makes it very hard to detect when a virtualenv exists if you have to search every directory just in case Really wish it was just .virtualenv and that's it :S |
I'm getting this:
I'm using nu v0.78.0 if that helps. |
the virtualenv version with the newest nushell syntax changes hasn’t been released yet, you can use it like this: # install dev version of virtualenv
pip install --user git+https://github.com/pypa/virtualenv.git
# update virtualenv with new script
python -m virtualenv /path/to/venv/ |
For me it was |
not sure if I'm doing something wrong, but when I get the dev version of |
Seems like venv doesn't have the nu support yet. However this worked for me python3.11 -m pip install virtualenv
python3.11 -m virtualenv env_nu
overlay use env_nu/bin/activate.nu
pip install -r requirements.txt |
yeah i think we have integration with |
Yes, I know python/cpython#108852 (comment) |
As a workaround I've been using You just have to remember that you're now in a subsubshell (
I wonder why venv's weren't implemented as subshells in the first place, it seems like a suitable abstraction to me. |
Is there a way to enter a python virtualenv from nushell?
The text was updated successfully, but these errors were encountered: