Custom Search

Saturday, May 11, 2019

Python What is the purpose “pip install --user"

There are two types of site-packages directories, global and per user.

#Global site-packages:
import site
site.getsitepackages()

#Global site-packages:
python -m site

#Global site-packages:
import sys
sys.path

#User site-packages:
python -m site --user-site

#you can find the user base binary directory by running
python -m site --user-base


* Running #pip list or #pip freeze gives you a list of all installed global site-packages.
* Running #pip list --user or #pip freeze --user gives you a list of all installed per user site-packages.

No comments:

Post a Comment