Jupyter using the wrong version of python

前端 未结 2 1800
旧巷少年郎
旧巷少年郎 2021-01-03 01:22

Hi I\'ve installed python 2.7 but did not remove 2.6. i\'ve added 2.7 to the path and also as an alias but it seems like when I do jupyter notebook it tries to access 2.6

相关标签:
2条回答
  • 2021-01-03 01:31

    It looks like you installed jupyter as an extension of /usr/lib/python2.6. If so, you'd have to uninstall jupyter and reinstall into your desired python.

    0 讨论(0)
  • 2021-01-03 01:43

    It could be a problem in your python kernel.json configuration. For example my python kernel is located at:

    /usr/local/share/jupyter/kernels/python/kernel.json
    

    and contains:

        {
         "language": "python",
         "display_name": "Python 2.7",
         "argv": [
          "/usr/local/bin/python2.7",
          "-m",
          "ipykernel",
          "-f",
          "{connection_file}"
         ]
        }
    

    Make sure that the path in argv section points to correct version of python.

    0 讨论(0)
提交回复
热议问题