I am trying to use jupyter notebook with python3. Then I added the kernel with
python3 -m pip install ipykernel
python3 -m ipykernel install --user
But when I start a notebook it shows a Dead kernel message, and the terminal shows
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
If I choose python2 kernel it works well. I can run python command in console without any issue.
Try
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
jupyter notebook
It worked for me.
Related
I already have jupyter notebook, and wanted to be able to run it in vs code.
I installed pip
PS C:\Users\ninet> py --version
Python 3.11.0
PS C:\Users\ninet> py -m pip --version
pip 22.3 from C:\Users\ninet\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)
and also jupyter extension, but whenever i try to run a simple .ipynb at vscode there's an error
python: can't open file 'C:\\Users\\ninet\\AppData\\Local\\Programs\\Microsoft VS Code\\Untitled-1.ipynb': [Errno 2] No such file or directory
I think I need to fix the path somehow , how can i fix it?
I tried to set the name by
python -m ipykernel install --user --name conda --display-name
but it doesn't run
Just upgraded my Mac to macOS Monterey 12.6, I am trying to use the python to create a project from a cookiecutter, throws this error:
ModuleNotFoundError: No module named 'cookiecutter'
The question has been solved
python3 -m pip install --upgrade pip
python3 -m pip install --user cookiecutter
I am following this guideline to troubleshoot my atom+hydrogen installation:
https://nteract.gitbooks.io/hydrogen/content/docs/Troubleshooting.html
Specifically, trying to run this part:
python3 -m pip install ipykernel
python3 -m ipykernel install --user
after running the python3 -m ipykernel install --user I get the following error:
/Library/Python/3.9/lib/python/site-packages/IPython/paths.py:66: UserWarning: IPython parent '/' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"
Installed kernelspec python3 in /usr/local/share/jupyter/kernels/python3
I am wondering what this error actually means and how I can get around it. I ran this code with sudo as well but it didn't help
PI3B, Buster.
I have installed both python3 and pip3 but when I use pip3 to install pyserial I get a no module error. The wrong directory is being used. How can I fix it please? volumio#pnbvolumio:~$ sudo python -m pip3 install pyserial /usr/bin/python3: No module named pip3 volumio#pnbvolumio:~$ pip3 --version pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
Using pip with sudo is not a good idea.
Read more here
Try to install pyserial using this command:
python3 -m pip install pyserial
You can also try to instal it for current user only:
python3 -m pip install pyserial --user
Also consider using virtual environmet to manage multiple environments and hassle free module managing.
After I uninstalled all python and reinstalled it again jupyter notebook does not work. I have tried:
pip3 install jupyter notebook
pip3 install jupyter
pip3 install notebook
pip3 install jupyterlab
pip3 install ipython
and the pip3 install --user and the pip and pip --user version of all above and still when i type
$ jupyter notebook
in my terminal i get the error
ImportError: No module named jupyter_core.command
i am on mac if that has something to do with it.
thank you
Installed anaconda and it is now magically fixed