command not found when I try execute shell script in jupyter cell
See original GitHub issueEnvironment data
- VS Code version: 1.67.0
- Jupyter Extension version (available under the Extensions sidebar): 2022.4.1001271738
- Python Extension version (available under the Extensions sidebar): 2022.6.0
- OS (Windows | Mac | Linux distro) and version: Mac
- Python and/or Anaconda version: python3.9
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): poetry
- Jupyter server running: Local
Expected behaviour

Actual behaviour

Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
This is due to my personal setup in zsh https://github.com/ztlevi/dotty-config/blob/652cff7fae4abadaa8016847933c71c235250b2d/env#L81
- To reproduce, you’ll probably need to set zsh as default terminal in macOS. Newer macOS already use zsh by default.
- Add the following code to your zshrc
function _load_all() {
mkdir -p $HOME/Downloads
local topics=($(ls $HOME/Downloads))
}
_load_all
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
info 17:27:20.562: Execute Cell 5 xxx.ipynb
info 17:27:21.148: Cell 5 executed with state Success
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
After installing with pip, "jupyter: command not found"
Open a terminal window using Ctrl+Alt+T. · Run the command gedit ~/.profile. · Add the line. export PATH=$PATH:/.local/bin/jupyter-notebook. to ...
Read more >zsh jupyter command not found - You.com | The Search Engine You ...
I've installed jupyter with pip a couple of weeks ago on my MacOS 10.15.7. I was executing it through the terminal perfectly so...
Read more >What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >Working with Jupyter Notebooks in Visual Studio Code
Visual Studio Code supports working with Jupyter Notebooks natively, ... When in command or edit mode, use Ctrl+Enter to run the current cell...
Read more >Jupyter notebook support | PyCharm Documentation - JetBrains
With Jupyter Notebook integration available in PyCharm , you can easily edit, execute, and debug notebook source code and examine execution ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks. This one doesn’t work for me. I have to tweak a little bit.
@ztlevi thanks for getting back with the information. The path variables are inherited from the VS Code process. As you haven’t launched vscode from a shell process, the environment variables are completely different. Basically the vscode application (& other desktop applications) don’t initialize any shell scripts and use any of the initialization shell scripts. Jupyter application on the other hand is launched from a terminal, hence the difference in the bahaviour and values of the
path
variable.As a temporary work around you could:
Please note, this is only a work around and we’ll be looking into a more permanent fix as part of #9682