-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Detect virtual environment with different python versions. #388
Conversation
Virtualenv site-packages will append to sys.path even if specified virtualenv has python version differs from version runs jedi.
What happen when the virtual environment has C extension modules I suggest to drop virtual environment support and treat it outside of Jedi (#385) since actual implementation is long if you want to treat all OS and all kinds of Python (#384 (comment)). |
I test it in python only libraries, sorry. Can you point me at any |
Threre are plenty of them. Here are few off the top of my head: numpy, PyQt, PySide, PyZMQ,... |
Thanks, I'll test it against PyZMQ tomorrow. |
Yes, this raise ImportError. |
Honestly, ImportError is better than I exported :-) Maybe we can workaround by try-expect. But the problem is that C extension ( |
Wait, you can detect Python version from virtualenv path so maybe you can just use Jedi in " (But I still think it's better to remove virtualenv support from Jedi.) |
Detect virtualenv throw environment variable seems unnecessary in jedi. So I consider removing it too. |
@davidhalter Which sentence you are talking about? In case you are talking about:
It's rather #384 (sys.path per Evaluator). If you can set |
Virtualenv site-packages will append to sys.path even if specified virtualenv has python version differs from version runs jedi.
This is a fix for my earlier issue #386.