zl程序教程

您现在的位置是:首页 >  Python

当前栏目

怎样查看jupyter中的python环境?

2023-03-15 23:22:01 时间

怎样查看jupyter中的python环境?

查看jupyter中的python环境的方法:(推荐:jupyter使用教程)

jupyter中查看当前python环境的方法:

import sys
print(sys.version)
print(sys.executable)

>>3.6.0 (default, Oct 16 2018, 15:45:51) 
[GCC 5.4.0 20160609]
>>/usr/local/bin/python3.6

 jupyter切换当前python版本

%% python2
import sys
print(sys.version)

>>2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609]

更多python知识请关注python视频教程。