pip freeze 和 conda list 的区别 [英] Difference between pip freeze and conda list

查看:89
本文介绍了pip freeze 和 conda list 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我同时使用pip freeze"和conda list"来列出我的环境中安装的软件包,但它们有什么区别?

I am using both "pip freeze" and "conda list" to list the packages installed in my environment, but what are their differences?

推荐答案

如果目标只是列出所有已安装的包,pip listconda list 是要走的路.

If the goal only is to list all the installed packages, pip list or conda list are the way to go.

pip freezeconda list --export 一样,更多地用于为您的环境生成需求文件.例如,如果您在自定义环境中创建了具有某些依赖项的包,则可以执行 conda list --export >要求.txt.当您准备好将您的包分发给其他用户时,他们可以使用 conda create --name 轻松复制您的环境和相关的依赖项.--file requirements.txt.

pip freeze, like conda list --export, is more for generating requirements files for your environment. For example, if you have created a package in your customized environment with certain dependencies, you can do conda list --export > requirements.txt. When you are ready to distribute your package to other users, they can easily duplicate your environment and the associated dependencies with conda create --name <envname> --file requirements.txt.


condapip 之间的区别需要更长时间的讨论.StackOverflow 上有很多解释.这篇文章 作者:Jake VanderPlas也可以阅读.


The differences between conda and pip need a longer discussion. There are plenty of explanations on StackOverflow. This article by Jake VanderPlas is a great read as well.

您可能还会发现 这张表很有用.它列出了 condapipvirtualenv 之间的操作等价.

You might also find this table useful. It lists operation equivalences between conda, pip and virtualenv.

这篇关于pip freeze 和 conda list 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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