-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv. #10955
Comments
If you install IPython outside a virtualenv, then activate the virtualenv and launch IPython, it lets you import modules from the env, for convenience. But this is not the same as running code properly inside the virtualenv, because it can access other modules from outside. So it warns you that if you really want to run code in the virtualenv, you should |
@takluyver thank you for response.
It already in virtualenv, as well as python. |
|
Oh, sorry, I should have read your post more closely. So the environment variable starts with |
Yep. I guess, it created by
|
OK, I think you've hit a case we're not checking for. The code for it is here: ipython/IPython/core/interactiveshell.py Lines 739 to 754 in 38e0033
Do you want to make a pull request? |
Thank you, @takluyver . But don't feel experienced enough in python yet, sorry. Could you do it, if know, how? |
@Pitometsu |
(I'm working on it - I think I've found a nicer, more robust way to do the check) |
@takluyver thank you for working on it
Could you make backport for |
Unfortunately a backport's not easy, because the |
@takluyver it may use workaround for python 2 and alternative os like here https://github.com/mcepl/ropevim/commit/ab87505b4aff3695e1385a3e463a7f7d5c473ad9 |
We also run into this warning, with a different usecase: Through ipdb, with environment created through
|
Would something like this work?
|
May be you should activate the virtual environment again. |
Resolving this probably requires an IPython fix. Related issue: ipython/ipython#10955 UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
What cause that warning?
The text was updated successfully, but these errors were encountered: