![](/img/trans.png)
[英]What is the difference between pip install and sudo pip install?
[英]What is the difference between sudo pip3 install pygame and sudo apt install python3-pygame
起初我輸入命令sudo pip3 install pygame
是為了安裝 pygame 但是后來當我輸入sudo apt install python3-pygame
時,它沒有提示我說它已經安裝了。 有什么區別?
apt
適用於 Debian 封裝。 pip
適用於 Python 封裝。
python3-pygame
是 Python 的pygame
重新打包為 Debian package。 因此,從技術上講,與 Python package 不同。
所以區別在於apt
和pip
如何報告已安裝的 package。
他們可能不會為您提供相同的版本。
pip
將從 pypi package 索引中獲取最新信息。
apt
將為您帶來包含在您的 ubuntu/debian 版本中的版本。
pip
也可以在 virtualenv 中使用,以免污染您的系統包。
一般來說, pip
版本將是較新的版本。
apt 用於 linux。pip 用於 python
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.