更新所有不是来自conda的pip包 [英] Update all pip packages that don't come from conda

查看:112
本文介绍了更新所有不是来自conda的pip包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7系统上,我尝试使用conda安装尽可能多的软件包.这些很容易更新

On my windows 7 system I try to install as many packages using conda. These are easy to update with

conda update all

不幸的是,一些软件包没有出现在conda中,但是可以通过pip获得,因此对于那些我使用pip安装它们的软件包.在Windows上更新所有pip包似乎比较困难,但是

Unfortunately some packages don't appear in conda but are available through pip and so for those I install them using pip. Updating all pip packages on windows seems more difficult but

for /F "delims===" %i in ('pip freeze -l') do pip install -U %i

是我发现的一种方式.

但是,这会尝试更新所有软件包,甚至我相信conda安装的软件包.

However, this attempts to update all packages, even those installed by conda I believe.

有什么方法可以只更新pip安装的那些软件包吗?

Is there some way to update only those packages installed by pip?

推荐答案

这是另一个使用conda list输出的简单脚本,其中包含pip包列表.

This is an another simple script using output of conda list which contains list of pip packages.

conda list | grep "<pip>" | cut -d " " -f 1 | xargs pip install --upgrade

这篇关于更新所有不是来自conda的pip包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆