I have installed anaconda on my MAC laptop, and tried to run jupyter notebook to install it, but I get error jupyter command not found.
You need to activate your conda environment (source bin/activate) and then do
$ pip install jupyter # Alternatively, you can do `conda install jupyter`
$ jupyter notebook # to actually run the notebook server
Add $HOME/anaconda3/bin to your $PATH and jupyter-notebook should work. There are a ton of other binaries you can lookup in that folder as well.
export PATH=$HOME/anaconda3/bin:$PATH
then
jupyter-notebook
#ffledgling anwser did not work for me. What did solve was to install jupyter using conda:
conda install jupyter
That did the trick. Right after the installation finished I went with
jupyter notebook
as my next command and saw the server setup and the browser page opening.
I had this same problem on my Mac OS. I'm also new to Python, so forgive me if this is an obvious solution.
What solved it for me was installing Python with the 'install for me only' option rather than the hard-drive option. If it tells you you can't, then reselect it. After that, the command jupyter notebook opened without a problem.
Hope it can help someone!
How to
It could be as simple as opening a new Terminal window.
For Windows
After you can successfully run conda from powershell, you can install jupyter with: conda install jupyter command. Then re-open powershell and run conda run jupyter notebook.
If your issue is happening after running conda install jupyter, you can use conda init zsh to configure the ~/.zshrc automatically so that when you just type jupyter notebook on terminal, it can find it.
I ran into the same problem try this instead
jupyter-notebook
I had the same issue on Mac. I am using Miniconda
Opened ~/.zshrc profile on nano as, nano ~/.zshrc
and added the location of miniconda on my mac as the last line of the ~/.zshrc as:
export PATH="/usr/local/Caskroom/miniconda/base/bin:$PATH"
solves the issue easily.
Open a new terminal and try again, it worked for me. This is written somewhere in the installation guide "For this change to become active, you have to open a new terminal."
If it's a fresh installation. Close the the terminal and re-open
You don't have to install jupyter explicitly. Anaconda does for you.
Ensure the environment is activated first.
If you selected Yes when prompted "Do you wish the installer to initialize Anaconda3 by running conda init? [yes|no]" during installation, prepend your commands with conda
mycomp#55:~$ conda activate
(base) mycomp#55:~$ jupyter notebook
After installing Anaconda on windows 10, you can use Anaconda prompt from start menu to activate a conda enabled terminal window.
You can run Jupyter from that window using:
jupyter notebook
You should first have conda in your PATH environment. You can achieve it taking a look on this answer.
Now you just need to run jupyter notebook.
Related
Hi I just installed conda.
When I open my terminal and type 'jupyter notebook', it automatically open it with conda environment.
I want to know if it is possible to open it in a non-conda environment? (that's to say, conda is now set as default when I open it, right?)
Thank you very much.
enter image description here
Conda is default environment for you now. For change
First activate the conda environment from the command line, then launch the notebook server.
For example:
$ source activate env_name
$ jupyter notebook
You can find more information in here
You most likely enabled auto activation of the conda environment during installation. Take a look at How do I prevent Conda from activating the base environment by default? to disable it (most likely via conda config --set auto_activate_base false). Then, you can double check via which python that you're not getting the conda version and install jupyter with your non-conda, system Python environnment - via python -m pip install jupyter.
I just updated my macOS to Catalina and I can't run python or open a jupyter notebook from terminal anymore. As an example, I get error message "ImportError: No module named pandas" when running my python code, and I get
zsh: command not found: jupyter
when running
jupyter notebook
This issue has brought me to anaconda (I would love someone to explain me why. Does python need anaconda to be ran?). I have tried several suggestions from https://github.com/ContinuumIO/anaconda-issues/issues/10998, e.g. I have tried copying folder "anaconda3" from "Relocated items" folder to "Users//", then
export PATH=''/Users/<username>/anaconda3/bin:$PATH"
but I get either
dquote>
or
zsh: /Users//Applications/anaconda3/bin/conda: bad interpreter: /anaconda3/bin/python: no such file or directory
I then tried to reinstall Anaconda using the graphic installer (from https://www.anaconda.com/distribution/#macos) following advice from someone from the anaconda team (https://www.anaconda.com/how-to-restore-anaconda-after-macos-catalina-update/) (I changed installation location to a folder I created in /Users//) but I still get the same error messages when running python3 or jupyter notebook.
How can successfully run python and jupyter notebook with macOS Catalina?
After installed macOS Catalina, we can switch the terminal from bash to zsh. There are many advantages from using zsh instead of bash, but One of the issues with zsh is some of the frameworks (jupyter notebook,conda) are not supported directly. Once I typed jupyter notebook in terminal to run it. It displayed “zsh: no such file or directory”.
The solver is simple but very difficult to find online.
If jupyter was already installed before the update and stopped working after zsh, you should be able to fix it by:
1.open zshrc in terminal by typing: open .zshrc or $open .zschrc
2. add the following line at the end of the file:
source ~/.bash_profile
It will ask zsh to use all the information from bash like the path of jupyter.
Hope it can help you out!
I'm answering to my own question in case it can help others ;)
I found my answer here: https://medium.com/#singhaniatanay18/mac-os-catalina-update-zsh-instead-of-bash-d688f68f70b8
(see comments as well)
Mac OS BigSur:
Uninstall Anaconda:rm -f Anaconda-Navigator.app
re-install pip3 install jupyterlab
I just updated to Catalina, two days before Big Sur release.. oh well.
Catalina came with changes to security and bash, that will remain for future releases. So Catalina moves your anaconda3 folder to /Users/Shared/Previously Relocated Items/Security/anaconda3 I tried to move it back to home directory, but that didn't work. So I deleted it, and reinstalled Anaconda using the command line installer Not the GUI installer, and it worked for me. You can follow instructions here and use /Users/me/anaconda3 folder as recommended here.
Here are the commands that worked for me,
shasum -a 256 /Users/username/anaconda3 . Although not sure it did anything
bash ~/Downloads/Anaconda3-2020.02-MacOSX-x86_64.sh or whatever the name of the command line installer from Conda in your Download folder, or wherever else you downloaded it.
Use sudo in front of the command if permission was denied, then enter your log in password for your Mac
source /Users/username/anaconda3/bin/activate conda init zsh
sudo conda init zsh then enter your Mac's password.
You should be all set now, and all commands like ipython, conda info, jupyter notebook, pyspark will all work.
The last command will make step3 command persist i.e. initialize conda base environment, such that you can run conda, ipython, jupyter notebook the next time you use terminal.
Install the Jupyter using Homebrew in zsh shell
If you don't Python install 3.3or higher.
Open terminal
Using Homewbrew install jupyter
brew install jupyter
Now, you start a notebook
jupyter notebook
I am running Windows 10 with Anaconda 3. I attempted to get to the Anaconda Navigator through clicking on navigator app in Explorer (Anaconda3\pkgs\anaconda-navigator-1.8.7-py36_0) but that only brings up a flash of what I assume is the command window (because it's too fast to see) and then nothing happens.
I can use the Anaconda prompt and so I tried running navigator using 'anaconda-navigator' and it gives error line:
".....is not recognized as an internal or external command, operable program or batch file."
I tried typing 'jupyter notebook' into the command line but the message is:
Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2
This has happened multiple times with me uninstalling and reinstalling Anaconda. How do I fix this as it seems to be a serious problem as almost nothing works?
For starters I would check the environment path.
if you go in the application folder, where the exe or run program is, can you start it?
Is there a bin folder? See if you can start Anaconda in debug mode.
this might help: http://anaconda-installer.readthedocs.io/en/latest/boot-options.html
I would first look to see whether anaconda-navigator and jupyter-notebook are installed in your environment through the command conda list at your anaconda prompt.
If they are missing just install them through conda install anaconda-navigator jupyter-notebook
Generally, i would execute the command conda install anaconda anaconda-navigator jupyter ipython just to be sure that no packages are missing from your environment.
Hope this helped. :)
To run anaconda-navigator:
$ source ~/anaconda3/bin/activate root
$ anaconda-navigator
I installed Jupyter Lab but cannot launch it (jupyter lab) due to the error: Error executing Jupyter command 'lab': [Errno 2] No such file or directory.
However, it is installed, and is show as one of available subcommands (via jupyter lab):
Available subcommands: bundlerextension console kernelspec lab labextension
labhub migrate nbconvert nbextension notebook qtconsole run serverextension
troubleshoot trust
Why does it not work and is there something I'm missing here? jupyter notebook works without any problems. I also added jupyter serverextension enable --py jupyterlab --sys-prefix according to the documentation on Github, FYI.
My working environment:
jupyter notebook --version # 5.0.0
jupyter version # 4.3.0
#Blazard open the .profile in your home using VIM add the following path
export PATH=$PATH:/home/<user-name>/.local/bin
save it
$ source ~/.profile (Dont forget to do this)
I had the same problem. Installing it over PyCharm IDE solved the problem for me. I am using Windows as an OS. Installing packages over PyCharm works in general better for me than over Windows cmd.
#Blaszard could you try the following
/home/<your-user-name>/.local/bin/jupyter-lab
SOURCE
EDIT
Alternatively, you would have to add /home/<your-user-name>/.local/bin to your PATH variable. However, you should probably just try it manually first and see if that even works at all.
simple solution I found for my mac powerbook is:
go to a working directory in the terminal and then type jupyter lab.
IT WORKS,
We need to find jupyter-lab command. In my case on a mac it is in /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/.
I'm using macports so my binaries are in /opt/local/bin. It's on my path:
> echo $PATH
.../opt/local/bin...
I have to create a symbolic link in this directory:
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/jupyter-lab jupyter-lab
I followed all the steps outlined in the other Python [root] posts, but still cannot get the python2 and python3 kernels to show up.
Here is what my Jupyter notebook shows:
and here is the startup log:
I have Anaconda3 installed (the 3.5 version).
How do I get the python2 and python3 kernels to show up?
I have the similar situation as yours and I solved it through:
Switch to the conda env you wanna show in Jupyter notebook
>>> source activate conda_env_name
Install/reinstall Jupyter under this env using:
(conda_env_name)>>> conda install jupyter
You should be able to see your env under Jypyter Kernel->Change kernels lists (this is my first stackoverflow answer, hope it helps you)
I had a similar issue but i had python 2.7.12 installed from anaconda and the default one came with Mac is 2.7.10.
When i open jupiter notebook, i used to get Python[conda root] and Python[default], after lot of struggling i did the following
conda update conda
conda uninstall ipython
conda install jupyter
now i see only 'Python 2' in my Jupiter notebook
hope this helps
I was stucked like you, and the solution is easy:
For more information: https://docs.continuum.io/anaconda/jupyter-notebook-extensions#notebook-conda
In the HOME of jupiter Notebook you will find: Files, Running, Clusters and Conda
Select Conda
Then there is a space for the conda environments, there is a sign +, clic on it to add a new environment, here you can select conda 2 or 3, depends on you, and give a name, it could be the same name Conda 3.
After that you refresh environment list, and then close jupyter notebook.
Finally, open it again, and it should works.