Open CalebFenton opened 4 years ago
It's even worse than this. I uninstalled the plugin because of this, and it still uses the hdinsightJupyter. It's rendering VSCode useless for python dev.
It has been fixed. Please try the latest version. Feel free to let me know if it still persist. You can click on the left bottom section of it to swith python. Thanks for filing the issue.
I am using a conda virtual environment for a specific pyspark project with spark&hive extension enabled, and installed virtualenv using pip in this conda virtual env only. The correct python interpreter (the one under the conda virtual env) is picked up (confirmed by lower left corner), however, the message under output window still use python from conda base, where virtualenv is NOT installed:
2020-6-9:22:50:54] [Info] Exec python, with args: --version [2020-6-9:22:50:55] [Info] Python 3.7.4
[2020-6-9:22:50:55] [Info] Exec pip, with args: --version
[2020-6-9:22:50:55] [Info] Link cluster
[2020-6-9:22:50:57] [Info] Exec virtualenv, with args: --version [2020-6-9:22:50:57] [Error] Error: spawn virtualenv ENOENT [2020-6-9:22:50:57] [Info] Exec python, with args: -m,virtualenv,--version [2020-6-9:22:50:57] [Info] .../opt/anaconda3/bin/python: No module named virtualenv --- this is the conda base env...
[2020-6-9:22:50:57] [Error] Exit with non zero 1
since the extension couldn't locate virtualenv, pyspark interactive mode is not working! How do I make pyspark interactive mode work with a conda virtual env?
@teeupdata , thanks for your feedback. I will look into it.
Are you the first time to install in tool?
first time trying pyspark interactive mode, have been using VS code developing Python locally
you preinstalled a conda virtual environment?
yes, I created a conda virtual environment first, then config python interpreter for that workspace to use python executable under that conda virtual env. this is confirmed by lower left corner message.
@teeupdata, thanks for your infor! May I reply to you later when I got a chance? Thanks a lot!
@zesluo I see this is closed. May I ask if this has been resolved? thanks.
This extension tries to run "python" but that's python 2 on my system and I don't want to use that.
Everything else seems to respect
python.pythonPath
in my settings.json pointing to my virtual environment.Would be nice if this respected the pythonPath or had it configurable somewhere. If it is configurable, it'd be nice if it were documented somewhere. If it's configurable and documented, maybe I'm just stupid and missed it?