点冻结和conda列表之间的区别 [英] Difference between pip freeze and conda list

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

问题描述

我同时使用"pip Frozen"和"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 > requirements.txt.当您准备将软件包分发给其他用户时,他们可以使用conda create --name <envname> --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.

您可能还会找到

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

这篇关于点冻结和conda列表之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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