-
Notifications
You must be signed in to change notification settings - Fork 169
/
pip.txt
36 lines (27 loc) · 914 Bytes
/
pip.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Notes for video: http://www.youtube.com/watch?v=3Mokyx5J2c4
1. searching pypi python packages ( https://pypi.python.org/pypi )
pip search <keyword>
2. installing as root ( may conflict with existing apps/weak security)
sudo pip install packagename
sudo pip2 install packagename
sudo pip3 install packagename
3a. installing as local user ( will goto ~/.local/bin )
pip install --user packagename
pip2 install --user packagename
pip3 install --user packagename
3b. add to bashrc/zshrc
# set shell to use local PATH ( avoid making alias for each apps)
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
4. upgrade a package from root/local
sudo pip install packagename --upgrade
pip install --user packagename --upgrade
5. list python apps
sudo pip list
sudo pip2 list
pip list
pip2 list
6. uninstalling
sudo pip uninstall packagename
pip uninstall --user packagename