2018年9月17日 星期一

which pip

$(head -1 `which pip` | tail -c +3) --version
$(head -1 `which pip3` | tail -c +3) --version

`which pip`  return the location of the app "pip"
ahd head means to show the first line of the app pip

the output will put into the last argument and -c +3



https://stackoverflow.com/questions/42662104/how-to-install-pip-for-python-3-6-on-ubuntu-16-10