I hope everyone is doing good.
I installed Python a couple of days ago and then I install Anaconda3 2019.
Here is the screenshot of my programs installed on my system.
Now when I am trying to work on Jupyter, it is not opening. I tried to open Jupyter Notebook directly from the start (It showed a terminal opening and closing but after that, Localhost couldn't start). Later I tried through Anaconda Prompt and it gives me this Error.
conda list command shows that Jupyter library is present but I don't know where the problem lies.
These are the paths Environment variable has:
I'm a newbie and playing with python, Jupyter. I will appreciate it if anyone can help me to solve this issue I'm currently facing.
Thanks & Regards
Umar
<<<<<<<<<<<<<<<<<<<<<<<<<<< Tried Suggestions >>>>>>>>>>>>>>>>>>>>>>>>>
Running Command conda install nb_conda produced this error:
Please follow the below steps:
conda activate <env_name>
conda install ipykernel
ipython kernel install --name <env_name> --user
If you are working on base environment, you can specify env_name as base.
Try running jupyter notebook using the command jupyter notebook
Hope this helps.
Go to your anaconda prompt and type the command conda install nb_conda.
Let this install and then try running the command jupyter notebook.
Let me know if this helps.
Related
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)
I have a Jupyter notebook running inside an Anaconda virtual environment that won't recognize the statsmodels package. I've used both pip and conda, and I've reinstalled the whole environment several times in between restarting my computer. As you can see in this link, both pip and conda show that it is installed. However, I continue to get this error:
---> 43 import statsmodels.api as sm
ModuleNotFoundError: No module named 'statsmodels'
At first I thought it was the kernel, but that wouldn't explain why every other package I've installed is recognized properly.
The only thing I haven't done is tried it on another computer (I'm running Windows 10 x64). I just want to know if anyone can see something that I'm missing before I do so.
Thanks!
Edit:
I've tried the following commands to install it:
pip install statsmodels
conda install -c conda-forge statsmodels
conda install statsmodels
I've tried using each command individually, making sure to uninstall the previous installation. I've tried using only two at a time, with the same methodology. I've tried every permutation of the above installations, with a computer restart in between. I don't think the problem is that it's not installing. I have no clue why but Jupyter notebooks just isn't recognizing this one package.
I'm running all of my commands from an Anaconda command prompt, and I make sure to activate my focal virtual environment. I also run Jupyter lab by typing it directly into the command prompt and hitting enter (I make sure I've activated my environment).
I'll try running it on a different OS and update.
Thanks duffymo! My notebook wasn't using the correct kernel. I thought all I needed to do was run Jupyter lab from my virtual environment, but it needs to be purposefully added. I followed the directions shown here to add my conda environment to Jupyter lab:
How to add conda environment to jupyter lab
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
I hope this question is not redundant, but I couldn’t find a solution on the internet so far. I’ve followed the github guide (https://github.com/fastai/fastai) to install the fastai library on my Anaconda environment. I want to use this library to tackle the ML course and solve other Kaggle competitions with it.
As per below, I’m opening my conda environment, selecting fastai and opening Jupyter Notebook:
When trying to run the packages in Jupyter, I still get an Import Error with No module named ‘fastai’. Any suggestions on what I’m doing wrong?
Had same issue. It looks like the problem is with "softlinks" fastai which are not working on Windows.
I fixed it with replacing that soflinks with real module fastai from root of repository. Just copied it to courses\dl1, courses\dl2, courses\dm1 and tutorials folders.
Prerry dirty. But works. Let me know how to fix it without copying.
Add a cell to the beginning of the notebook, !python -m pip install git+https://github.com/fastai/fastai.git
Edit:
Now that fastai is 1.0 and on pip, you probably just want to !python -m pip install fastai.
I prefer the !python -m pip syntax over just calling pip when mixing anaconda and pip, but it probably just reflects my system's python being messed up.
I had trouble making fastai_v1 work in jupyter lab, however it was working on the terminal. So the problem was with the virtual environment not being selected in the jupyter lab when it was launched.
I used the below code to make it work. Replace 'myenv' with your virtual environment name.
source activate myevn
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
jupyter lab
more info here: Conda environments not showing up in 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.