目录
1.安装
2卸载
3.使用
3.1(创建,激活,推出,删除)虚拟环境
3.2.jupyter notebook添加Anaconda的虚拟环境(待补充)
4.运行jupyter时导入库遇到的一些报错
4.1导入pandas
参考文献
1.安装
1.pip3安装
pip3 install jupyter
2.pip安装
pip install jupyter
3.cuda安装
conda install jupyter
2卸载
用什么安装用什么卸载
1.pip卸载
pip uninstall jupyter
2.cuda安装
cuda uninstall jupyter
3.使用
3.1(创建,激活,推出,删除)虚拟环境
# 创建虚拟环境
conda create -n Pytorch2 python=3.7 # Pytorch2 是虚拟环境的名字,可自由更换,python=3.7指定你需要的版本。conda env list # 查看环境列表,知道系统中所有设置的环境# 激活虚拟环境
Linux: source activate Pytorch2 #Pytorch2为你想要激活环境的名字
Windows: activate Pytorch2python --version # 检查当前虚拟环境python的版本# 退出当前虚拟环境
Linux: source deactivate Pytorch2
Windows:deactivate Pytorch2 # 删除虚拟环境
conda remove -n Pytorch2 --all
3.2.jupyter notebook添加Anaconda的虚拟环境(待补充)
注:需要在虚拟环境下输入
命令行在窗口中利用pip安装ipykernel
输入:pip install ipykernel
建立Jupyter与anaconda环境的联系
-输入:pip install nb_conda
4.运行jupyter时导入库遇到的一些报错
4.1导入pandas
直接输入:
pip install pandas
报错 :
ERROR: Could not find a version that satisfies the requirement pandas (from versions: none)
ERROR: No matching distribution found for pandas
解决1:
# 信任镜像源后下载
pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
解决2:
# python3以上版本用以下代码,python2版本将下列代码的3改为2
py -3 -m pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
解决3:如果1,2不行
pip --trusted-host pypi.python.org install pandas
其他镜像源地址:
国内常用镜像源
清华大学 :https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科学技术大学 :http://pypi.mirrors.ustc.edu.cn/simple/
华中科技大学:http://pypi.hustunique.com/
豆瓣源:http://pypi.douban.com/simple/
腾讯源:http://mirrors.cloud.tencent.com/pypi/simple
华为镜像源:https://repo.huaweicloud.com/repository/pypi/simple/
参考文献
1.Jupyter Notebook 安装与使用教程_小智解说的博客-CSDN博客
2.下载 jupyter_jupyter下载_未来之王的博客-CSDN博客
3.Jupyter NoteBook下载、安装、numpy安装、pandas安装、代码补全_草莓泡芙@的博客-CSDN博客
4.最新Anaconda 创建Python3.6,Python3.7虚拟环境,为Pytorch,tensorflow创建单独环境_anaconda创建python3.6_集电极的博客-CSDN博客
5.Jupyter中安装深度学习pytorch框架并import torch测试_赴迢遥的博客-CSDN博客
6.在Anaconda Jupyter Notebook中如何安装Pytorch_MaliciousSoftware的博客-CSDN博客
7.【Anaconda+jupyter notebook】jupyter notebook安装的三种方法及切换虚拟环境_conda install jupyter_Kiki酱。的博客-CSDN博客