How can I display the version of my Jupyter notebook and run cells in Jupyter notebooks? I get an error: bad interpreter How can I display the version of my Jupyter notebook and run cells in Jupyter notebooks? I get an error: bad interpreter python python

How can I display the version of my Jupyter notebook and run cells in Jupyter notebooks? I get an error: bad interpreter


You can simply do:

jupyter --version

Here is the output in my case:

jupyter core     : 4.5.0jupyter-notebook : 5.2.2qtconsole        : 4.5.2ipython          : 5.5.0ipykernel        : 4.10.1jupyter client   : 5.3.1jupyter lab      : not installednbconvert        : 5.5.0ipywidgets       : 7.5.0nbformat         : 4.4.0traitlets        : 4.3.2


*How to check iPython version

You can check it with conda list ipython

conda list ipython


  • This is definitely a path issue : You have your anacondda python interpreter path in /Users/cr517/anaconda/bin/python
  • But your jupyter is pointing to /Users/cr517/.local/bin/jupyter but it should have pointed to /Users/cr517/anaconda/bin/jupyter
  • Run the following command gedit /Users/cr517/anaconda/bin/jupyter
  • Check the first line of the opened file which will have the hardcoded path of jupyter and check whether the path in the file is correct or not
  • If the path is not /Users/cr517/anaconda/bin/jupyter than make it /Users/cr517/anaconda/bin/jupyter
  • But the problem may not solve here because there are other jupyter files if you do ls *jupyter* many of these files have the hardcoded path which might be wrong which might be reason why you are able to open he ipynb but cannot create the cell
  • This is too much work to do ... to manually change path for every file
  • Just reinstall anaconda and your problem will be solved
  • In case you are reinstalling run this bash Anaconda....sh -b -p "Users/cr517/anaconda"