Installing jupyter notebook shows command not found - python

Im trying to install jupyter notebook but when I run jupyter/jupyter-notebook/jupyter notebook It shows command not found. I'm using python 3.7 and have tried all commands like :
pip install jupyter
pip3 install jupyter
python -m pip install jupter notebook
pip install --user jupyter
sudo pip install jupyter
enter image description here
It shows an exception error I don't know why?

Are you using cmd to install?
If yes, then you want to install the classic Jupyter Notebook using:
pip install notebook
Then, you can run with:
jupyter notebook
jupyter-notebook
py -m jupyter notebook
py -m jupyter-notebook
python -m jupyter notebook
python -m jupyter-notebook
That works fine for me. Tell me if you still have problems.

Related

How to have a jupyter notebook use the correct kernel?

On a MacOS Mojave I am trying to run a jupyter notebook with a python 3.7 kernel. Following this instructions I did the following:
virtualenv -p pythpn3.7 venv3.7
source venv3.7/bin/activate
pip install jupyter
ipython kernel install --name "venv3.7" --user
I then start a notebook
jupyter notebook some_notebook.ipynb
and I select the kernel venv3.7, but when I do a python -V I get an answer python 3.6.9 instead of python 3.7.6. And when I do a
!which python
inside the notebook I get the wrong answer
/Users/me/.pyenv/versions/3.6.9/bin/python
So how to get a python 3.7 kernel inside a jupyter notebook?
The instructions shown in this page are wrong!
The correct way to do this is:
python -m ipykernel install --user --name=venv3.7

how start and install with jupyterlab notebook?

I want to start working by jupyter notebook. I am using Mac. I did the following commands in terminal.
pip install jupyterlab
pip install notebook
They were installed well now in terminal I type :
jupyter notebook
And get :
-bash: jupyter: command not found
try anaconda, the best and easiest way to use jupyter notebook
Try this:
pip install --upgrade notebook
Then run
jupyter notebook
In case, you may have some python version inconsistency, always install PiPy packages with this command:
python -m pip install jupyter
Most of time, this type of installation, resolve many issues.
If your issue not solved, refer to this question, this is about your similar problem with Jupyter in Windows.

Import OpenCV on jupyter notebook

I tried installing OpenCV on Windows 10 using pip.
I used this command-
pip install opencv-contrib-python
After that when I tried importing cv2 on command prompt, it was successfully imported-
When I tried importing it on jupyter notebook, this error popped up-
This is the python version I'm using-
This is pip list and as I've highlighted, opencv-contrib-python version 3.4.3.18 is installed-
Then why can't I import OpenCV on jupyter notebook, like tensorflow or numpy are also in pip list and I'm able to import them both through command prompt and also on jupyter notebook.
Please help. Thanks a lot.
You have installed openCV in Python running on your Terminal, not into the working environment which Jupyter Notebooks is running from.
Whilst in Terminal write:
py -m pip install opencv-python
When you use pip list
You should see opencv-python 3.4.3.18
More information here.
In the Anaconda Navigator. Launch conda console as below.
In the console: run conda install opencv
Try this in anaconda prompt:
First create a new enviorment :
conda create -n opencv
then :
conda activate opencv
then:
conda install -c anaconda opencv
source:youtube
You should open the anaconda prompt and then type:
conda install opencv
It should work.
It seems like you run jupyter not from conda environment, that has opencv module installed.
try to do this:
conda activate <your environment>
conda install jupyter
jupyter notebook
after that try to "import cv2"

Why is my install code for Anaconda Launcher and Jupyter Notebook not working in IDLE for Python 2.7?

I am trying to install Anaconda Launcher and was supplied the following code to type into the terminal:
conda install -c anaconda launcher
I also tried and failed to install just Jupyter Notebook with the following code:
python -m pip install jupyter notebook
Both lines of code yielded: SyntaxError: invalid syntax

How to choose which jupyter notebook to run?

I have installed jupyter notebook for Python 3 (installed through pip) and for Python 2 (installed through anaconda stack which included scipy and scikit-learn and similar scientific tools).
When I run jupyter notebook in console it opens but I can choose only Python 2 kernel.
In terminal try inputting this:
python3 -m pip install ipykernel
and this:
python3 -m ipykernel install --user
Then restart jupyter and anaconda and you should be able to select the other kernel version.

Categories

Resources