[英]What is the difference between sudo pip3 install pygame and sudo apt install python3-pygame
At first I entered the command sudo pip3 install pygame
in order to install pygame but then when I entered sudo apt install python3-pygame
, It did not prompt me saying that it was already installed.起初我输入命令
sudo pip3 install pygame
是为了安装 pygame 但是后来当我输入sudo apt install python3-pygame
时,它没有提示我说它已经安装了。 What is the difference?有什么区别?
apt
is for Debian packages. apt
适用于 Debian 封装。 pip
is for Python packages. pip
适用于 Python 封装。
python3-pygame
is Python's pygame
repackaged as a Debian package. python3-pygame
是 Python 的pygame
重新打包为 Debian package。 So, technically, not the same as the Python package.因此,从技术上讲,与 Python package 不同。
So the difference is how apt
and pip
report an already installed package.所以区别在于
apt
和pip
如何报告已安装的 package。
They may not get you the same version.他们可能不会为您提供相同的版本。
pip
will get the latest from the pypi package index. pip
将从 pypi package 索引中获取最新信息。
apt
will bring you the version that was included for your ubuntu/debian release. apt
将为您带来包含在您的 ubuntu/debian 版本中的版本。
pip
can also be used in a virtualenv so as not to pollute your system packages. pip
也可以在 virtualenv 中使用,以免污染您的系统包。
In general the pip
version will be the newer one.一般来说,
pip
版本将是较新的版本。
apt is for linux. pip is for python apt 用于 linux。pip 用于 python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.