windows系統下jupyter notebook使用虛擬環境


top

【親測好使】windows系統下jupyter notebook使用虛擬環境

在虛擬環境中安裝jupyter,並添加到jupyter kernel

進入虛擬環境安裝jupyter:

(py37) C:\Users\JulianYang\Desktop\testJ\PyTorch\yolov3>pip install jupyter

添加當前虛擬環境到jupyter kernel:

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

然后就出現了:

參考

windows系統中Python多版本與jupyter notebook使用虛擬環境的過程_python_腳本之家
https://www.jb51.net/article/161301.htm

↑ Back to the top

【未測試,但覺得比上面那方法好,因為上面那方法還需要在虛擬環境中再安裝jupyter,這樣很冗余】

安裝ipykernel,將環境添加到Jyputer中

1.打開Anaconda Prompt,輸入conda env list 查看現有環境
2.輸入activate name(name是你想切換的環境)
3.conda install ipykernel 安裝必要插件
4.python -m ipykernel install --name Name 將環境添加到Jyputer中(Name是此環境顯示在Jyputer中的名稱,可自定義)

參考

如何在windows系統下的jupyter 中使用虛擬環境 - weixin_42382050的博客 - CSDN博客
https://blog.csdn.net/weixin_42382050/article/details/90214311

jupyter notebook添加python內核(windows)
https://www.icode9.com/content-3-71611.html

↑ Back to the top


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM