Jupyter Notebook authentication token while in Pycharm

后端 未结 6 1530
萌比男神i
萌比男神i 2020-12-22 18:02

I am trying to use the Jupyter notebook in Pycharm, but I realized that in the new Jupyter update, there was the addition of tokens.

I am following the tutorial belo

相关标签:
6条回答
  • 2020-12-22 18:38
    1. Edit/enter the URL as: http://localhost:8888 (remove "?token=" at the end) and click OK.
    2. A bubble prompt will appear near the top of your PyCharm window, saying "Cannot connect to Jupyter Notebook. Run Jupyter Notebook". It should look like this (depending on your color scheme):

    1. Click on the link: "Run Jupyter Notebook"
    2. PyCharm will start the Jupyter server for you and it will create a new token. Look at View -> Tool Windows -> Run, to see details of the new token, and an optional URL to open in a web browser.

    More info: https://www.jetbrains.com/help/pycharm/using-ipython-jupyter-notebook-with-pycharm.html

    0 讨论(0)
  • 2020-12-22 18:44

    The shortest way I found:
    If you type jupyter notebook in a PowerShell terminal, PowerShell will automatically print out the localhost, port, and token that PyCharm needs to run.

    You can run the command from PyCharm Terminal so it will go to the same interpreter if you have several.

    0 讨论(0)
  • 2020-12-22 18:45
    1. Run Anaconda Navigator
    2. Create Or Open New Notebook
    3. Press F12 Or Inspect Element
    4. Search For 'token' in its html code
    5. You Can Find something like this : 'data-jupyter-api-token="02eaf15f7fb715725c85602867d0b2585962e0ee...."'
    0 讨论(0)
  • 2020-12-22 18:48

    I had to reinstall Anaconda and some old config files for my Jupyter Notebook. Check for possible existing jupyter config file, that could contain a password or Token in some cases:

    • open terminal

    • Check for jupyter configuration directory:

      jupyter --config-dir

      (example output)>>> C:\Users\Username.jupyter

    open the file and check if "NotebookApp" is assigned in the file:

    {
      "NotebookApp": {
        "password": "sha1:1af4568a9g:64gsded68g4dsh434df634fhd684"
      }
    }
    
    0 讨论(0)
  • 2020-12-22 18:49

    For the people like me, who don't know where is the terminal ->Another way which I find easier is:

    1) open new Jupyter notebook in your browser. Look at the URL, there you can see your localhost (example: localhost:8889) and change the default one at PyCharm if necessary.

    2) for the token, while you are in the browser press F12 and then Ctrl + F and search for 'token'. It would be somewhere there in the html code, a long string of random numbers and letters.

    0 讨论(0)
  • 2020-12-22 18:57

    Running jupyter notebook list will display all of the running servers on your machine. So doing this in the terminal after starting a cell in PyCharm will result in output similar to Currently running servers: http://127.0.0.1:8888/?token=f85145dda03dc598bbbfa6e53b93cbcb27629ea00cfd2105 :: /home/.... which contains the appropriate token for authenticating.

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