美文网首页
python实用小技巧

python实用小技巧

作者: 倾启君 | 来源:发表于2017-07-16 12:55 被阅读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

    相关文章

      网友评论

          本文标题:python实用小技巧

          本文链接:https://www.haomeiwen.com/subject/ivmtkxtx.html