Anaconda
jupyter notebook 压缩/解压文件夹
创建虚拟环境:
conda create -n your_env_name(虚拟环境名称)
conda create --prefix <指定location>/your_environment_name python=3.8
查看已经创建的虚拟环境:
conda env list
删除创建的虚拟环境:
conda remove -n your_env_name(虚拟环境名称) --all
退出当前虚拟环境到base:
conda activate root
注:在激活的环境中安装需要的包!!!
在anaconda prompt中完成激活后运行以下命令
下载项目需要的包:
pip install -r "path/requirements.txt"
whl网站:
https://www.lfd.uci.edu/~gohlke/pythonlibs/ //python库包
https://download.pytorch.org/whl/torch_stable.html //pytorch
查看支持的环境包:
anaconda search -t conda ***(所需包名)
jupyter notebook如何使用虚拟环境:
激活需要添加的虚拟环境,在虚拟环境下运行下面的语句:
conda install ipykernel
python -m ipykernel install --name your_env_name(虚拟环境名称)
jupyter notebook如何删除已经添加的虚拟环境:
jupyter kernelspec list #查看已添加的虚拟环境
jupyter kernelspec remove * #删除名为 * 的虚拟环境
利用豆瓣源进行相关库的下载命令:
pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple matplotlib==3.5.0
python -m pip install pandas -i https://pypi.douban.com/simple
常用的解压缩命令:
zip -r /destination/archive.zip /path/to/files # 想要压缩到的位置及名字 后需要压缩的文件路径
unzip /destination/archive.zip -d /path/to/files #解压.zip文件到指定位置