From Jupyter extension: StdErr from ShellExec, Did not find path entry
See original GitHub issueIssue Type: Bug
Informarion
Extension version: 2020.11.371526539 VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-10T23:34:32.027Z) OS version: Windows_NT x64 10.0.18363
Bug description
I created a virtual environment “tensorflow” with tensorflow module by Anaconda. When I directly opened VScode and run the following program in Jupyter extension:
import tensorflow as tf
print(tf.__version__)
The Jupyter extension reminded as following:
No module named 'tensorflow'
When I opened VScode from Anaconda and run the program, from Jupyter extension reminded me as following at the bottom right corner:
StdErr from ShellExec, Did not find path entry D:\Anaconda\bin for D:/Anaconda/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\kh\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\pyvsc-run-isolated.py c:/Users/kh/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
But when I used python extension to run the program, and whether I opened VScode from Anaconda or not, the Python debug console reminded me as follow:
PS D:\seafile\VScode> cd 'd:\seafile\VScode'; & 'D:\Anaconda\envs\tensorflow\python.exe' 'c:\Users\kh\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\lib\python\debugpy\launcher' '50887' '--' 'd:\seafile\VScode\hhh.py'
2020-11-24 22:50:52.079132: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2.3.1
PS D:\seafile\VScode>
I put this question in VScode-Juypter repo but be recommended to open a new issue in VScode-python repo. I hope someone can solve this question. Thanks!
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i5-9400 CPU @ 2.90GHz (6 x 2904) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 7.84GB (1.14GB free) |
Process Argv | –crash-reporter-id 6a652439-042b-4523-8c8c-eea565986121 |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18
@neuromechanist @pierre01 @ayman-aa1405810 @christina-0725 We believe we have resolved this issue, please could you install the following Python extension to test the fix & let us know how it goes. https://pvsc.blob.core.windows.net/extension-builds-jupyter-public/ms-python-insiders.vsix
Extensions: Install from VSIX
Yes, this worked for me as well. I have not tried the VSIX approach though. Thanks for sharing the solutions