anaconda 环境新建/删除/拷贝 jupyter notebook上使用p

安装包

pip使用国内镜像

# pip安装
pip install pyecharts
# 源码安装 - linux
git clone https://github.com/pyecharts/pyecharts.git
cd pyecharts
#pip install -r requirements.txt
python setup.py install

图片[1]-anaconda 环境新建/删除/拷贝 jupyter notebook上使用p-唐朝资源网

# 或者执行 python install.py

参考资料:pip的更多用法

查看系统中过时的库:

#列出所有安装的库
pip list
#列出所有过期的库
pip list --outdated

pip show pandas
#更新过期python库
pip install pandas --upgrade --user
pip install pandas==版本
pip uninstall pandas
conda upgrade --all
conda install nb_conda

conda uninstall pyqt5

方法一:循环

新版本下:

import pip
from subprocess import call
from pip._internal.utils.misc import get_installed_distributions

图片[2]-anaconda 环境新建/删除/拷贝 jupyter notebook上使用p-唐朝资源网

for dist in get_installed_distributions():   call("pip install --upgrade " + dist.project_name, shell=True)

旧版本下:

import pip
from subprocess import call
 
for dist in pip.get_installed_distributions():

    call("pip install --upgrade " + dist.project_name, shell=True)

方法二:点子-

pip install pip-review
pip-review --local --interactive

删除 pkgs 中无用的包

建议在讨论组中使用 Conda clean -p 删除未使用的软件包;在实践中 conda clean -a 更强大。

参考资料:

pip — 批量更新过时的库

© 版权声明
THE END
喜欢就支持一下吧
点赞7赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容