close

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

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How can I display the version of my Jupyter notebook and run cells in Jupyter notebooks? I get an error: bad interpreter in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

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

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

    From your terminal, you can simply do:
    jupyter --version
    Or, if you are using a notebook then do:
    !jupyter --version

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

    From your terminal, you can simply do:
    jupyter --version
    Or, if you are using a notebook then do:
    !jupyter --version

Method 1

From your terminal, you can simply do:

jupyter --version

Or, if you are using a notebook then do:

!jupyter --version

Here is the output in my case:

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

Method 2

  • 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"

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read