如何从python 3-jupyter笔记本电脑切换到python 2.7 [英] How to switch to python 2.7 from python 3- jupyter notebook

查看:529
本文介绍了如何从python 3-jupyter笔记本电脑切换到python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Jupyter笔记本实例,它同时具有python 2和python 3内核.但是,当我使用python 2内核并执行以下语句时,

I am running a Jupyter notebook instance and it has both python 2 and python 3 kernels. However, when i use the python 2 kernel and execute below statements,

import sys
sys.executable

我得到python 3路径

I get python 3 path

'/usr/bin/python3.4'

我如何强制它使用python 2.7

How do i force it to use python 2.7

推荐答案

用pip代替pip3重新安装Jupyter是可行的

Re-installing Jupyter with pip instead of pip3 is what worked

这篇关于如何从python 3-jupyter笔记本电脑切换到python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆