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

后端 未结 6 1338
悲&欢浪女
悲&欢浪女 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:38

    I found something about this. My ubuntu has both python version 3.6 and 3.7. When apt install python3-xxx, xxx will be installed at /usr/lib/python3/dist-packages, but pip3 install xxx at /usr/local/lib/python3.7(my default python version)/dist-packages. And when change python to version 3.6, xxx installed by pip3 could not work, while installed by apt works fine.

提交回复
热议问题