While my Jupyter Notebook is running, the terminal shows that it is saving files periodically. How to run "pip install" using command lines in the terminal while the Jupyter Notebook is running? I believe I need to find a way to get back to the "~ username $:," from which I can type commands. I tried 'cd/' but it didn't seem to work.
So far I've been closing out of Anaconda, finishing "pip install", and getting back into Anaconda.
It sounds like you are using a unix-type system. In that case you can
In the jupyter notebook do !pip install <whatever package it is>
In the terminal window, type ^Z and then bg, then type your pip install command.
Open another terminal window, and do your pip install.
Related
Hi I am using virtual studio and running the command on Jupiter notebook.
But this error happens.
"Failed to find a kernelspec to use for ipykernel launch"
Why can't I execute the command this time?
I had a similar situation. I was trying to switch from Anaconda to VS Code to run jupyter notebooks. Installed the extension for jupyter notebook and every time I tried creating an empty notebook and basic commands failed to run. On the top right corner, I noticed that the kernel just showed Busy. If you click on that it would ask for a kernel.
I was able to get it working after I installed the python extension on vscode.. not sure if this is the best approach though!!
You need to install the Python libraries Jupyter and ipykernel. On my VS Code editor, a prompt came up saying that ipykernel is missing, and clicking the "install" button would solve it.
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 tried to open the jupyter notebook using Command Prompt on Windows 10. Instead of it opening in the browser as it should, nothing happens.
I have downloaded jupyter using
pip install jupyter
pip install jupyter notebook
All this worked fine but when I type this in Command Prompt only a new line forms and nothing happens.
C:\Users\meena\OneDrive\Desktop\New folder>jupyter notebook
C:\Users\meena\OneDrive\Desktop\New folder>
I have tried to install jupyter many times but it doesn't work.
I only have python and not anaconda. So if someone else has the same problem and has tried anaconda please tell me so I can download it.
Have you tried typing jupyter-notebook and see if it works? I upgraded Anaconda recently, and typing jupyter notebook stopped working for some of my files, but I solved the problem by typing 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 am very new to this and seem to always have issues with python and running things from the the command line. I have been following these instructions:
https://jupyter.readthedocs.io/en/latest/running.html#starting-the-notebook-server
When I get to the step where I am to type "jupyter notebook" in the command line nothing happens.
Did you check localhost:8888 in your browser?
If that does not work, then in your anaconda command prompt, try conda install jupyter notebook to make sure that it is installed correctly