-
Notifications
You must be signed in to change notification settings - Fork 297
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 Launcher does not work for Python terminal or Python Interactive window #3619
Comments
Not sure we support py as the python executable. This would be an extension wide problem, @DonJayamanne ? |
@bcoov , I assume running |
@rchiodo that is correct, it just returns |
@d3r3kk I don't think this is datascience specific. The python terminal doesn't work either. |
@bcoov what do you have |
@brettcannon My vscode pythonPath is If it helps, I can change interpreters between 3.7 and 2.7 using the |
OK, so it seems the @bcoov are you sure the that the Python interpreter you have for |
@brettcannon |
@bcoov. Sorry about the delay on this. I'm on the data science team and I've now picked this up to investigate. From what I can tell we can do a little bit of work here to make this easier for you, but there is also a reasonable workaround for you to try. I set up the same scenario as you and I can repro the issue. However I can only repro this issue when the python scripts directory is not active on the PATH variable. If the scripts path is added to the path then the Interactive Windows works. Also if you are working with either an activated virtualenv or with an activated conda env then the script path will be added and this works as expected. Doing any of those things would be the best way to get this working for you. More Info: This format only works if the scripts directory is on the path. When the scripts directory is not on the path most of the commands will work with the following format: I'm going to change our code to fallback to the non-jupyter version if the jupyter version fails. I think this should unblock the basic scenario. However some of the commands (like the jupyter kernelspec command) still don't work in this situation. So even after this fix I would recommend creating a virtual env or conda env for your project (so that it can be activated) or adding your python scripts directory to the path. |
Thanks for the update @IanMatthewHuff! I added the Scripts directory to my PATH to try the workaround you suggested. After restarting VSCode and trying to run the cell, it sat there reporting "Starting Jupyter Server" indefinitely. However, after another restart, running the cell again started up the server instance and ran as expected. |
Sounds good. My fix to run this without the scripts directory has been merged in, so it will ship with our next extension update. Should be in about a week from now. |
@IanMatthewHuff Apologies for the delay. Finally got a chance to test out the 2019.3.6139 merged fix - everything looks good on my end! 😄 |
Thanks for reporting that back @bcoov. Glad to know that you are unblocked now. |
Environment data
Expected behaviour
Clicking "Run-Cell" above a note-book enabled snippet starts and runs Jupyter Notebook
Actual behaviour
Clicking "Run-Cell" triggers an error stating "Executing code failed : Error: Running cells requires Jupyter notebooks to be installed."
Running
py -m notebook
from a cmd window and/or VSCode's terminal starts jupyter notebook as expected for Python 3 and similarlypy -2 -m notebook
for Python 2.Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: