Python pip: Difference between revisions

From wikinotes
No edit summary
Line 9: Line 9:
|}
|}
</blockquote><!-- Locations -->
</blockquote><!-- Locations -->
= Install =
<blockquote>
<syntaxhighlight lang="bash">
python2 <(curl https://bootstrap.pypa.io/pip/2.7/get-pip.py)
python3 <(curl https://bootstrap.pypa.io/pip/get-pip.py)
</syntaxhighlight>
</blockquote><!-- Install -->


= Usage =
= Usage =

Revision as of 23:50, 6 February 2022

python package manager.

Locations

~/.local/lib/pythonX.X/site-packages user packages

Install

python2 <(curl https://bootstrap.pypa.io/pip/2.7/get-pip.py)
python3 <(curl https://bootstrap.pypa.io/pip/get-pip.py)

Usage

pip install <package>         # install package
pip install --user <package>  # install to $HOME dir
pip install 'git+https://github.com/tangentlabs/django-oscar-paypal.git@master

pip list                # list installed
pip search <package>    # deprecated
import site
site.getusersitedir()   # pip install --user packages installed here