gpt4 book ai didi

python - 为什么使用 pip 而不是 easy_install?

转载 作者:IT老高 更新时间:2023-10-28 11:58:30 25 4
gpt4 key购买 nike

一个 tweet阅读:

Don't use easy_install, unless you like stabbing yourself in the face. Use pip.

为什么使用 pip 而不是 easy_install? fault lie with PyPI and package authors mostly 不是吗? ?如果作者将垃圾源 tarball(例如:缺少文件,没有 setup.py)上传到 PyPI,那么 pip 和 easy_install 都会失败。除了外观上的差异,为什么 Python 人(如上面的推文)似乎强烈更喜欢 pip 而不是 easy_install?

(假设我们讨论的是社区维护的 Distribute 包中的 easy_install)

最佳答案

来自 Ian Bicking 自己的 introduction to pip :

pip was originally written to improve on easy_install in the following ways

  • All packages are downloaded before installation. Partially-completed installation doesn’t occur as a result.
  • Care is taken to present useful output on the console.
  • The reasons for actions are kept track of. For instance, if a package is being installed, pip keeps track of why that package was required.
  • Error messages should be useful.
  • The code is relatively concise and cohesive, making it easier to use programmatically.
  • Packages don’t have to be installed as egg archives, they can be installed flat (while keeping the egg metadata).
  • Native support for other version control systems (Git, Mercurial and Bazaar)
  • Uninstallation of packages.
  • Simple to define fixed sets of requirements and reliably reproduce a set of packages.

关于python - 为什么使用 pip 而不是 easy_install?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3220404/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com