question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Conda/Jupyter issue error: "StdErr from ShellExec, 'Analysis'..."

See original GitHub issue

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Installed VSCode and Miniconda3 on Windows 10, making sure to add Miniconda3 to the PATH env variable
  2. installed python extension for vscode
  3. Created new conda env:
conda create -n itp_2020 python=3.6 jupyter scikit-learn seaborn pandas xlrd
  1. selected itp_2020 python interpreter
  2. opened existing/ created new ipynb and executed any cell

Actual behavior

Get the following error:

StdErr from ShellExec, 'Analysis' is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\bianc\.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py

Expected behavior

Successfully start jupyter server and execute cell.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: v2020.6.90262
  • VS Code version: 1.46.1
  • Setting python.jediEnabled: false
  • Setting python.languageServer: Jedi
  • Python and/or Anaconda version: miniconda3: 4.8.3 (python: 3.7.7.final.0)
  • OS: Windows | Mac | Linux (distro): Windows 10
  • Virtual environment: conda

Developer Tools Console Output

[Extension Host] Info Python Extension: 2020-06-28 00:15:28: Activating Environment to capture Environment variables, C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py console.ts:137 [Extension Host] Error Python Extension: 2020-06-28 00:15:30: getActivatedEnvironmentVariables [Error: StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py at E.getActivatedEnvironmentVariablesImpl (c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\out\client\extension.js:48:706808) at processTicksAndRejections (internal/process/task_queues.js:85:5)] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Error Python Extension: 2020-06-28 00:15:30: getActivatedEnvironmentVariables, Class name = E, completed in 2269ms, has a falsy return value, Arg 1: undefined, Arg 2: {“architecture”:3,“path”:“C:\Users\bianc\miniconda3\envs\itp_2020\python.exe”,“version”:{“options”:{“loose”:false,“includePrerelease”:false},“loose”:false,“raw”:“3.6.10-final”,“major”:3,“minor”:6,“patch”:10,“prerelease”:[“final”],“build”:[],“version”:“3.6.10-final”},“sysPrefix”:“C:\Users\bianc\miniconda3\envs\itp_2020”,“fileHash”:“ac2778943090fefbc43561e8fa5926bb61829a26bef4a1965cbb0bbf88f3a15cad4aa3fa32130b3cfb14cb8e4417c782f57f99ec5227803d50baf31c764eb310”,“companyDisplayName”:“Anaconda, Inc.”,“type”:“Conda”,“envPath”:“C:\Users\bianc\miniconda3\envs\itp_2020”,“envName”:“itp_2020”,“displayName”:“Python 3.6.10 64-bit (‘itp_2020’: conda)”}, Arg 3: true [Error: StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py at E.getActivatedEnvironmentVariablesImpl (c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\out\client\extension.js:48:706808) at processTicksAndRejections (internal/process/task_queues.js:85:5)] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Info Python Extension: 2020-06-28 00:15:30: Finished executing cell c12deb14-7a4e-4cec-a4bc-85ca689034c0 notificationsAlerts.ts:40 StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py onDidChangeNotification @ notificationsAlerts.ts:40 (anonymous) @ notificationsAlerts.ts:26 fire @ event.ts:587 addNotification @ notifications.ts:207 notify @ notificationService.ts:106 (anonymous) @ mainThreadMessageService.ts:83 _showMessage @ mainThreadMessageService.ts:44 $showMessage @ mainThreadMessageService.ts:38 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Error Python Extension: 2020-06-28 00:15:30: DataScience Error [Error: StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py at E.getActivatedEnvironmentVariablesImpl (c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\out\client\extension.js:48:706808) at processTicksAndRejections (internal/process/task_queues.js:85:5)] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Error Python Extension: 2020-06-28 00:15:30: getActivatedEnvironmentVariables [Error: StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py at E.getActivatedEnvironmentVariablesImpl (c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\out\client\extension.js:48:706808) at processTicksAndRejections (internal/process/task_queues.js:85:5)] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Error Python Extension: 2020-06-28 00:15:30: getActivatedEnvironmentVariables, Class name = E, completed in 2274ms, has a falsy return value, Arg 1: undefined, Arg 2: {“architecture”:3,“path”:“C:\Users\bianc\miniconda3\envs\itp_2020\python.exe”,“version”:{“options”:{“loose”:false,“includePrerelease”:false},“loose”:false,“raw”:“3.6.10-final”,“major”:3,“minor”:6,“patch”:10,“prerelease”:[“final”],“build”:[],“version”:“3.6.10-final”},“sysPrefix”:“C:\Users\bianc\miniconda3\envs\itp_2020”,“fileHash”:“ac2778943090fefbc43561e8fa5926bb61829a26bef4a1965cbb0bbf88f3a15cad4aa3fa32130b3cfb14cb8e4417c782f57f99ec5227803d50baf31c764eb310”,“companyDisplayName”:“Anaconda, Inc.”,“type”:“Conda”,“envPath”:“C:\Users\bianc\miniconda3\envs\itp_2020”,“envName”:“itp_2020”,“displayName”:“Python 3.6.10 64-bit (‘itp_2020’: conda)”}, Arg 3: true [Error: StdErr from ShellExec, ‘Analysis’ is not recognized as an internal or external command, operable program or batch file. for C:/Users/bianc/miniconda3/Scripts/activate && conda activate itp_2020 && echo ‘e8b39361-0157-4923-80e1-22d70d46dee6’ && python c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\pythonFiles\pyvsc-run-isolated.py c:/Users/bianc/.vscode/extensions/ms-python.python-2020.6.90262/pythonFiles/printEnvVariables.py at E.getActivatedEnvironmentVariablesImpl (c:\Users\bianc.vscode\extensions\ms-python.python-2020.6.90262\out\client\extension.js:48:706808) at processTicksAndRejections (internal/process/task_queues.js:85:5)]

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
DavidKutucommented, Jun 29, 2020

I see, in the image you shared, your server has not started. Conda sometimes has issues activating outside of its prompt. Please try this:

  • close VS Code
  • open the Anaconda Prompt (not cmd.exe nor PowerShell)
  • in the Anaconda Prompt, go to your project folder C:\Users\bianc\Desktop\itp\itp_spring_2020
  • activate your environment: conda activate itp_2020
  • run VS Code: code .
  • try to run a cell

Please let me know if that works for you.

5reactions
BiancaAU1commented, Jul 1, 2020

It works now. I put C:\Users\bianc\AppData\Local\Programs\Microsoft VS Code\bin into System Variables and then ran code . in the Anacondaa Prompt. It took a while for Jupyter Server to report local but it seems to be working now. Thank you for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot open jupyter book in the vscode with anaconda
Activating Python 3.8.5 32-bit ('base': conda) to run Jupyter failed with Error: StdErr from ShellExec, 䤣 C:\WINDOWS\TEMP\tmpveyllbs2.bat  ...
Read more >
How to Fix Kernel Error in Jupyter Notebook
So, a kernel error occurs when Jupyter fails to connect with a ... I do most of my development and analysis on my...
Read more >
Fix Anaconda + Jupyter Notebook "module not found" errors ...
It's a kernel problem ! Let's walk through how to solve “module not found” errors when Jupyter can't find the Python you want...
Read more >
What to do when things go wrong - The Jupyter Notebook
What to do when things go wrong . First, have a look at the common problems listed below. If you can figure...
Read more >
Conda / Jupyterの問題エラー:「ShellExecのStdErr
StdErr from ShellExec, 'Analysis' is not recognized as an internal or external command, operable program or batch file. for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found