当前位置: 首页 > 后端技术 > Python

pip和conda常用命令

时间:2023-03-26 17:54:09 Python

pip#基本pipshownumpypiplistpiplist--outdated#安装和卸载包pipinstallnumpy#同时安装多个包pipinstallnumpyscipymatplotlibpipuninstallnumpypipinstallSomePackage-1.0-py2。py3-none-any.whl#导入导出需求spipinstall-rrequirements.txtpipfreeze>requirements.txt#清除缓存pipcacheremove*conda#在PowerShell中使用如下命令初始化condainitpowershell#列出已有的condaenvironmentscondaenvlist#新建环境condacreate-nnew_env#新建指定Python版本的环境(会自动安装指定版本的最新稳定版)condacreate-nnew_envpython=3.x#复制自现有环境和创建新环境condacreate-nnew_env--clonesource_env#删除一个环境condaremove-ndel_env--all#在当前环境更新Pythoncondainstallpython=3.7#更新当前环境下的所有包condaupdate--all#清理缓存condaclean--all