What is the difference between installing a package using pip vs. apt-get?

后端 未结 6 1397
悲&欢浪女
悲&欢浪女 2021-01-31 03:25

I\'m trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I\'m able to install them using either apt-get or using pip. Is th

6条回答
  •  独厮守ぢ
    2021-01-31 03:35

    I always recommend installing Python package with pip, because some OS package managers do packages customizations, and it can either break or change package's behavior.

    If you need to install a package globally:

    $ sudo pip install PACKAGE
    

    And it will try to download your package from PyPI or project's links.

提交回复
热议问题