python实用小技巧

2017-07-16  本文已影响0人  倾启君

pip更新全部Package

import pip
from subprocess import call


for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)

jupyter-notebook配置虚拟环境

1.安装jupyter notebook

pip install jupyter

2.为jupyter添加kernel

python -m ipykernel install --user --name=env_name

3.运行

jupyter notebook

最后在new的时候选择env_name

上一篇 下一篇

猜你喜欢

热点阅读