美文网首页
Jupyter简单入门

Jupyter简单入门

作者: 0error_ | 来源:发表于2020-11-10 14:52 被阅读0次
    如何在jupyter中使用虚拟环境:

    首先进入终端,输入conda env list,查看到需要用的虚拟环境(以pytorch为例)
    进入该虚拟环境:conda activate pytorch

    conda install ipykernel
    (也可以pip install ipykernel)
    
    python -m ipykernel install --name 这里写在jupyter中该环境的名称
    (比如python -m ipykernel install --name pytorch_cpu)
    
    这一步可能的报错:

    Permission denied 'usr/local/share'
    解决办法:
    python -m ipykernel install --user --name pytorch_cpu

    再进入终端,输入jupyter notebook,可以看到就有“pytorch_cpu”啦


    image.png

    https://blog.csdn.net/weixin_42382050/article/details/90214311

    如何导出py文件:
    image.png

    相关文章

      网友评论

          本文标题:Jupyter简单入门

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