[英]Python package management in Mac OS X
Every time I tried to install a new package for python on Mac OS X, I had this issue which these packages had different ways to setup with different package management tools. 每次我尝试在Mac OS X上为python安装新软件包时,都会遇到此问题,这些软件包具有使用不同软件包管理工具进行设置的不同方法。 Specially for new versions of Mac OS X 10.9 Mavericks, some of installers are buggy, then I needed to switch between them.
特别是对于Mac OS X 10.9 Mavericks的新版本,某些安装程序存在问题,因此我需要在它们之间进行切换。 I'm asking for a short description and comparison between these main command-line installers:
easy_install
, pip
, port
, apt-get
, brew
, fink
, and etc. Of course, sometimes there is no way other than installing through source code make install
, python setup.py
, or .pkg
installer files. 我要简短描述一下这些主要的命令行安装程序,并进行比较:
easy_install
, pip
, port
, apt-get
, brew
, fink
等。当然,有时候除了通过源代码make install
安装之外别无其他方法make install
, python setup.py
或.pkg
安装程序文件。 But I guess that's not the case when you need to install more complicated packages with lots of dependencies. 但是我想当您需要安装具有很多依赖关系的更复杂的程序包时,情况并非如此。
What I'm asking has two sides: 我要问的有两个方面:
brew
throws warnings on port
availability) brew
会警告port
可用性) They have one area of overlap in terms of 'why do i need one of each?' 他们在“为什么我需要每个都需要一个?”方面有一个重叠的领域。 and that is Library dependencies.
那就是图书馆的依赖。
pip is the tool endorsed by the most python developers and the python packaging SIG going forward, so TLDR; pip是大多数python开发人员和以后的python打包SIG认可的工具,因此TLDR; use pip not easy_install
使用pip not easy_install
these tools also work with virtualenvs and virtualenvs are great. 这些工具也可以与virtualenvs一起使用,virtualenvs很棒。 use them :)
使用它们 :)
You will however run into occasions where you need other libraries that python doesnt quite know what to do with when you try and build a python package with pip. 但是,当您尝试使用pip构建python软件包时,会遇到需要python不太了解该怎么做的其他库。 It is these moments that make it necessary to have one of the other tools.
正是这些时刻使得拥有其他工具之一成为必要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.