Windows "jupyter notebook" command failing - python

Running jupyter notebook returns Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2
(In general, all commands jupyter subcommand fail this way)
However, running jupyter-notebook works just fine.
Also, running jupyter works fine, just says an argument is required.
"C:\Python36\Scripts" is in my PATH environment variable, and both jupyter.exe and jupyter-notebook.exe are there.
I'm running python 3.6 on Windows 10, ipykernel 5.1.0, notebook 5.7.4, ipython 7.2.0, jupyter was installed via pip
I tried reinstalling jupyter, but nothing changed. I need jupyter subcommand to work because some external scripts which I can't change use it and fail.
Any ideas?

Related

MacOS SSH Server find password

I have been trying to use Jupyter Notebooks and pipenv within Visual Studio Code using the Jupyter notebooks extension. My notebook file that just does print("hello") works fine using the global venv, but when using a pipenv env of the local project, it throws this error:
The kernel failed to start as '/Users/username/.local/share/virtualenvs/
crypto-analytics-N-3y3yvZ/lib/python3.10/site-packages/psutil/_psutil_osx.cpython-310-darwin.so'
could not be imported from '/Users/username/.local/share/virtualenvs/
crypto-analytics-N-3y3yvZ/lib/python3.10/site-packages/psutil/_psutil_osx.cpython-310-darwin.so,
0x0002'.
I am running this on an M1 Macbook. (that might be why I get the
Prior to running the notebook, I ran pipenv install ipykernel
Moreover, running jupyter notebook from outside of the local env (just running on my main env) does not let me open the .ipynb file at all Error loading notebook.
How can I fix this? What am I doing wrong? I just want to use pipenv and jupyter notebook in vscode.

How to get Jupiter Notebook to run when given a zsh: command not found: jupyter error

I have been using Jupiter notebook for a long time and it has worked fine. Today when I tried to use the 'jupyter notebook' command in terminal to open it, I got 'zsh: command not found: jupyter'. I have tried reinstalling Jupiter notebook and it says its already installed. I don't know what could have gone wrong, the only thing that has changed since it was working is that I installed command line tools for Xcode, but I don't know if that would cause this.
Edit: I'm on a Mac with Monterey installed.
If you are using anaconda, miniconda or conda in general, you would need to activate with conda activate <env_name> for Windows or conda source <env_name> for linuxOS, and this will require a restart of the terminal if you are doing this for the first time.
Default env name is base.
If the problem persists (or you aren't using conda) check if the pathing is correctly pointing towards python where jupyter exists / is installed. (Check which location of python is used check this question)

How to enable jupyter extension without admin by appropriate way of calling subcommand

this question is a representative one for a bunch of questions related to the execution of subcommand of "jupyter" command in Windows.
As I could not get the Admin to install jupyter, I have used pip install notebook --user in cmd, and it is not accessible to add jupyter to PATH as well. When using cmd calling "jupyter" or "notebook" would get me "jupyter/notebook is not recognized as an internal or external command, operable program or batch file", so the only way I could call a notebook is by python -m notebook, and a python -m jupyter would get me the usage of this command, like --help, --version or so.
However, sometimes I might need to add subcommand to jupyter, like jupyter contrib nbextension install, but since jupyter is not in the PATH, calling this command directly would give "not recognized" error. Still, it is also not feasible for this command: python -m jupyter contrib nbextension install, as it would give me "Jupyter command 'jupyter-contrib' not found".
This issue has troubled me for a while, so I am looking for any help/advice. Perhaps there should be correct way to call subcommand of jupyter following python -m?
Great thanks.
This command works for me
jupyter labextension install #jupyterlab/github --app-dir dir_with_permission
Run in jupyter notebook
./jupyter labextension install #jupyterlab/github --app-dir dir_with_permission
If not, try which jupyter and see if you can use the full location

jupyter lab not opening on jupyter-lab in CMD like in docs

In the official jupyter labs installation guide, it says to install jupyter labs with pip install jupyterlab and then launch with jupyter-lab.
However, what I did was try the first installation method, and when the jupyter-lab command to open didn't work, I tried installing again with python -m pip install jupyterlab.
Now the jupyter-lab command that is listed still isn't recognized, but after playing around, I found that python -m jupyterlab opens jupyter labs for me.
Why is this?
Should I be concerned that I messed anything up, should I just keep using the command that I found, or try to fix my installation so that the official jupyer-lab opens the program up?
Thanks

Fatal Error when starting jupyter notebook

Issue: I get fatal error when I run jupyter notebook in cmd.exe as administratortor
in: python -m pip install jupyter
out: success
in: jupyter notebook
out: Fatal error in launcher: Unable to create process using '"'
I've tried the following, but I get same fatal error when I try to launch jupyter notebook from cmd
uninstalled jupyter and installed anadonda (https://repo.continuum.io/archive/Anaconda3-5.0.1-Windows-x86_64.exe)
tried answer listed here but does not resolve the issue (Fatal error in launcher: Unable to create process using ""C:\Program Files (x86)\Python33\python.exe" "C:\Program Files (x86)\Python33\pip.exe"")
ran pip3 install --upgrade pip and ran pip3 install jupyter
ran jupyter notebook --help and I get same error
Environment
Windows 10 Pro 64-bit version 1709 build 16299.125
Python 3.6.4 (see sys paths in screen shot below)
screen shot of error
https://www.dropbox.com/s/ai0ualjfj87uaaq/python_issue_20180127.png?dl=0
docs used:
https://jupyter.readthedocs.io/en/latest/install.html
https://jupyter.readthedocs.io/en/latest/running.html#running
http://jupyter.readthedocs.io/en/latest/install.html#alternative-for-experienced-python-users-installing-jupyter-with-pip
What worked for me was the command python -m notebook - I did not have Anaconda installed
I believe you need to open Jupyter notebooks by typing jupyter notebook in the anaconda prompt, not the regular windows command prompt.
For Windows users that have anaconda installed, try on Windows CMD/Powershell (better if you run it as admin):
(Assuming your environment is named "root")
activate root
jupyter notebook
Hope that helps
In my case, There was one redundant path of python3 added in the environment variable already and I was adding again.
I just removed that path and run jupyter notebook through command prompt and it worked perfectly.
I know this sounds strange ... But I ran:
python -m pip install jupyter
I did this inside my Anaconda (which I shouldn't have to do) and it installed jupyter... fixed the issue for me
Had the same problem what I did was
pip install jupyter
and then, just went ahead and typed
jupyter notebook
works like magic now
These command in cmd works:
activate root
jupyter notebook
The second command to open jupyter notebook is :
jupyter-notebook-script.py
I basically try to open notebooks with jupyter lab so what I have done is the following:
1.Right-click on any notebook select "open with" then select "choose another app"
Now select "look for another app in pc"
Go to the directory where your Anaconda Scripts are present. For me it's C:\ProgramData\Anaconda3\Scripts
Select "jupyter-notebook.exe" or "jupyter-lab.exe"
Now every notebook will open automatically just by hitting enter and no need to type the command again and again
For those ones who do not have anaconda
python -m jupyter notebook
I was using the Python37 installation from the Microsoft store, when I suddenly got the 'Fatal error in launcher: Unable to create process' error while trying to start the jupyter notebook. I actually tried every answer here, but with no succees.
The solution was to completely uninstall/delete everything Python/Jupyter related from AppData as well as the leftovers from my preceeding Anaconda installation and then go for a clean install from python.org.
I guess this is something we all have to do from time to time.
Check in to your Environment Variable Paths. If you had installed both Python(Python 2.x.x) or Python3(Python 3.x.x) you will have a problem running Scripts file of python, since you had duplicated install. Uninstall the redundant one.
If you had tried to fix it multiple times and nothing works, try re-install your Python. This save lives every time.
This problem is caused by your antivirus program because I suffered from the same issue, then I discovered that my antivirus software that I am using which is Avast was blocking python.exe file for some reasons that I do not understand.
So you should go to your antivirus settings and make an exception for python.exe file to unblock it.
Had the same problem and tried every suggestion here and in other forums.
In the end, removing the environment via conda remove and then creating it again worked. But I had to update conda via
conda update -n base -c defaults conda
and then start the notebook via jupyter notebook
I resolved this problem on Windows by running the Anaconda Prompt as Administrator, and then launching JupyterLab. Launching JupyterLab from the Anaconda Prompt with elevated privileges seems to have solved the issue entirely.

Categories