Xintong Li

Tools

pip

upgrading all packages with pip on Macintosh

pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U --ignore-installed

You are recommended to use pip in conda. Check which pip you are using with which pip. If you have to use the original pip in system, you have to disable the integrity protection of mac.

After the integrity protection of mac is disabled, run the previous command to update all pip packages, and don’t forget to enable the protection finally.

offline installation with pip

Download a package to a directory.

pip install --download <directory> <package>

Install a offline package.

pip install --no-index --find-links=<directory> <package>