如何从Ubuntu jupyter-notebook c python3

时间:2018-11-06 00:08:37

标签: python ssh pycharm jupyter-notebook google-colaboratory

我使用pycharm从jupyter-notebook通过ssh连接到远程服务器。我在pycharm中输入了一个令牌,并在import sys print(sys.version)的帮助下进行连接以检查python的版本,它显示出正在使用第二个Python。请告诉我jupyter笔记本团队从python3开始需要什么键?

1 个答案:

答案 0 :(得分:0)

有效

conf = open('/usr/local/share/jupyter/kernels/python2/kernel.json')
conf.readline()
conf.readline()
str = conf.readline()

if str[18] != "3":
  print("old python")
  !sed -i '2!s/python/python3/' /usr/local/share/jupyter/kernels/python2/kernel.json
else:
  print("python 3 activated")