Pip (Python)
Naar navigatie springen
Naar zoeken springen
Pip is de officiële Python package manager.
Dit artikel stamt uit 2018. Oude zooi (inclusief alles rondom Python2) heb ik in dec. 2020 verwijderd. Zie Geschiedenis weergeven als je dat toch nodig hebt. Dit artikel heeft uitsluitend betrekking op Python3.
Installatie
Dec. 2020, Linux Mint - Moeiteloos:
sudo apt install python3-pip
Testen:
> pip bash: pip: command not found > pip3 Usage: pip3 <command> [options] ...
Installatie van packages
Bv.:
pip3 install pymysql
Locatie van packages
Je kunt de locatie via de command line achterhalen. Bv.:
> pip3 show PyMysql Name: PyMySQL Version: 0.10.1 Summary: Pure Python MySQL Driver Home-page: https://github.com/PyMySQL/PyMySQL/ Author: yutaka.matsubara Author-email: yutaka.matsubara@gmail.com License: "MIT" Location: /home/jeroen/.local/lib/python3.8/site-packages Requires: Required-by:
Ongetwijfeld kun je packages ook op account-onafhankelijke locaties installeren (bv. op een webserver), maar die kennis heb ik nu niet paraat.
Environments
[1]:
- virtualenv/venv are utilites that allow users to create isolated Python environments that work with pip.