Jupyter not found when checked with quarto in Mac - jupyter

I installed the Jupyter with brew, and when I type
jupyter --version
I got the following
IPython : 8.8.0
ipykernel : 6.16.0
ipywidgets : not installed
jupyter_client : 7.3.5
jupyter_core : 4.11.1
jupyter_server : 1.19.1
jupyterlab : 3.4.8
nbclient : 0.6.8
nbconvert : 7.1.0
nbformat : 5.6.1
notebook : 6.4.12
qtconsole : not installed
traitlets : 5.8.0
But when I checked the Jupyter with quarto:
quarto check jupyter
I got the following
[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Library/Developer/CommandLineTools/usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
It seems that the Jupyter installed via brew could not be found by the quarto.
Is there a way to fix this with out reinstalling the Jupyter with pip?
Thanks

Related

kernel failed to start using conda environment with Jupyter in Visual Studio Code

When using a Jupyter notebook file in Visual Studio code with the Jupyter extension I receive the error The kernel failed to start due to the missing module 'ipykernel_launcher'. Consider installing this module. View Jupyter [log](command:jupyter.viewOutput) for further details.
This notebook works correctly from the JupyterLab web application when I select the same conda environment that was selected in Visual Studio Code.
pip list shows that ipykernel version 5.3.4 is installed, but I don't know how to install ipykernel_launcher. I tried reinstalling pyzmq and it didn't help.
Any ideas why this isn't working?
Had the same problem. My solution is --
First uninstall all jupyter related modules:
python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console jupyterlab_pygments notebook qtconsole nbconvert nbformat jupyterlab-widgets nbclient ipykernel ipynb
(from: https://stackoverflow.com/a/52912244/1516331)
And then reinstall ipykernel. I'm using VScode so when I run a cell, VSCode asked me to installipykernel. The following should work the same alternatively:
conda install -c conda-forge --update-deps --force-reinstall ipykernel -y

Visual Studio Code does not render ipywidgets correctly

I am having issue using Visual Studio Code. the code seem to have issue with ipywidgets.
the code is below (very simple interactive chart)
from ipywidgets import interact
import ipywidgets as widgets
import numpy as np
import plotly.graph_objects as go
#interact
def foo(beta=(-10,10,1)):
myx = np.arange(0,100,1)
myy = myx *beta
print ('debug:',myy)
fig = go.FigureWidget()
fig.add_scatter(x= myx, y=myy)
fig.show()
the same code works just as expected in Jupyter Notebook.
I dig further and it seems:
"widgets require us to download supporting files from a 3rd party website. Error loading plotlywidget: ^4.14.3
https://github.com/microsoft/vscode-jupyter/wiki/IPyWidget-Support-in-VS-Code-Python
This is where I got stuck.. What's the next then to fix this issue?
any guidance much appreciated
thanks
Some of the issues I've seen reported seem to have started after the release of ipywidgets 8.
I don't understand exactly what's broken (or if it's broken), but downgrading to version 7.7.1 fixed all issues I was having.
If you want to try it as well, you can run: pip install -U ipywidgets==7.7.1
There two things you can explore.
Check modules:
Run the jupyter --version command inside your conda or virtual environment.
You should see something like this:
IPython : 8.4.0
ipykernel : 6.9.1
ipywidgets : 7.7.1
jupyter_client : 7.2.2
jupyter_core : 4.10.0
jupyter_server : 1.21.0
jupyterlab : 3.4.8
nbclient : 0.6.4
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : not installed
traitlets : 5.4.0
If there are any of those modules not installed (Apart from qtconsole) try installing them (with pip install "module") and restarting the kernel.
Check Jupyter nbextension.
As mentioned here after running pip install ipywidgets try:
jupyter nbextension enable --py widgetsnbextension
Note: If you are using virtual environments (including conda environments) the recommended way to activate the extension is to run
jupyter nbextension enable --py --sys-prefix widgetsnbextension
I hope this helps.

how do I install mysql on anaconda with this: Solving environment

I'm a newbie when it has to do with installing packages through the cmd and would appreciate your help
I'm trying to install mysql-connector to my anaconda environment with this command:
conda install -c anaconda mysql-connector-python
and I get the following error:
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
I tried to the solutions suggested in this post but nothing works:
Conda install and update do not work also solving environment get errors
(meaning I tried creating another environment, than installing and also tried to run this
conda config --set channel_priority false but to no vail).
My conda version is the lastest - conda 4.10.1
here is the info for my conda
active environment : base
active env location : C:\Users\admin\anaconda3
shell level : 1
user config file : C:\Users\admin\.condarc
populated config files : C:\Users\admin\.condarc
conda version : 4.10.1
conda-build version : 3.21.4
python version : 3.8.8.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\admin\anaconda3 (writable)
conda av data dir : C:\Users\admin\anaconda3\etc\conda
conda av metadata url : https://repo.anaconda.com/pkgs/main
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\admin\anaconda3\pkgs
C:\Users\admin\.conda\pkgs
C:\Users\admin\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\admin\anaconda3\envs
C:\Users\admin\.conda\envs
C:\Users\admin\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.8 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
Appreciate your help
Found the issue
The problem was my python version 3.8, which does not support mysql-connector
Once I downgraded to 3.7.10 it worked perfectly fine

jupyter ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython'

I recently upgraded jupyter, but now I get
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython'
when I run for instance jupyter-notebook or jupyter notebook
and pip install --upgrade pyzmq did not solve the issue
any idea?
Thanks
ps: I am on Mac OS 10.15.5 , with jupyter --v:
jupyter core : 4.6.3
jupyter-notebook : 6.0.3
qtconsole : 4.5.5
ipython : 8.0.0.dev
ipykernel : not installed
jupyter client : not installed
jupyter lab : 1.2.3
nbconvert : 5.6.1
ipywidgets : not installed
nbformat : 5.0.4
traitlets : 4.3.3
I had the same issue and below fixed my problem:
pip uninstall pyzmq
pip install pyzmq
This actually worked. If you are launching jupyter-notebook from a venv and you get this error message, just pip unistall pyzmg and pip install pyzmg. You should be fine.

IPython not available in Spyder

I don't think I'm suffering from the problem in this closely related question.
I'm running Linux Mint 16 (based on Ubuntu 13.10) and have Spyder 2.2.5 and IPython 0.13.2.
Under the Interpreters menu I only see Open a Python interpreter... and not an option to open an IPython interpreter.
Is there anything I have to do to "show" Spyder where IPython "is"?
Here is the output of my "Optional Dependencies":
IPython >=0.13 : 0.13.2 (OK)
matplotlib >=1.0: 1.2.1 (OK)
pep8 >=0.6 : None (NOK)
pyflakes >=0.5.0: 0.7.3 (OK)
pylint >=0.25 : None (NOK)
rope >=0.9.2 : 0.9.2 (OK)
sphinx >=0.6.6 : 1.1.3 (OK)
For me, the IPython console was not available anymore in Spyder (2.3.8) after updating IPython to version 4.1.1.
The solution was to install/upgrade qtconsole:
pip install -U qtconsole
See also https://github.com/spyder-ide/spyder/issues/2608#issuecomment-130586847
In principle you should be able to open an IPython console with View -> Windows -> IPython console... do you have this?
If this is not an option, try this: from an interpreter window,
import IPython
IPython.start_ipython()
In my case (Spyder3.0.0dev), I checked:
Help -> Optional dependencies
and saw that my IPython was outdated. So shut Spyder and I upgraded ipython,
sudo pip3 install ipython --upgrade
or if you use Python2:
sudo pip install ipython --upgrade
and restarted Spyder. Voila! IPython console is there
Had the same issue and in this case I missed the ipython-qtconsole package.
On my Mint OS :
sudo apt-get install ipython-qtconsole
did the trick.
I found the info there https://pythonhosted.org/spyder/installation.html after having tried the proposed solutions of this post
For python 3, following resolved the issue for me on Mint OS
sudo apt-get install ipython3-qtconsole
sudo pip3 install ipython --upgrade
sudo pip3 install qtconsole --upgrade
With this it's done and working!
For me on Sypder 3.7 this worked:
Consoles->Restart Kernal (Ctrl+.)
then:
Consoles -> Open an IPython console (Ctrl+T)
Coming over from Windows 10 to Linux Mint still more comfortable with the Software Manager, installed Spyder3, Ipython, Python-tk, and Ipython3-qtconsole, don't know if Ipython or Python-tk where necessary. Spyder3 now has a "Open IPython console" drop down under Consoles.