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

后端 未结 3 1199
醉梦人生
醉梦人生 2021-02-19 01:37

I have installed Anaconda and I use the conda environments and the conda command to install software.

When I type: jupyter notebook --version

I get

3条回答
  •  迷失自我
    2021-02-19 02:17

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

提交回复
热议问题