- Notifications
You must be signed in to change notification settings - Fork135
mitsuhiko/pipsi
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
pipsi =pipscriptinstaller
pipsi makes installing python packages with global entry points painless. These are Python packages that expose an entry point through the command line such asPygments.
If you are installing Python packages globally for cli access, you almost certainly want to use pipsi instead of runningsudo pip ...
. so that you get
- Isolated dependencies to guarantee no version conflicts
- The ability to install packages globally without using sudo
- The ability to uninstall a package and its dependencies without affecting other globally installed Python programs
pipsi is not meant for installing libraries that will be imported by other Python modules.
curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py| python
to see installation options, including not automatically modifying the PATH environment variable
curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py| python - --help
pipsi is a wrapper around virtualenv and pip which installs scripts provided by python packages into isolated virtualenvs so they do not pollute your system's Python packages.
pipsi installs each package into~/.local/venvs/PKGNAME
and then symlinks all new scripts into~/.local/bin
(these can be changed byPIPSI_HOME
andPIPSI_BIN_DIR
environment variables respectively).
Here is a tree view into the directory structure created by pipsi after installing pipsi and runningpipsi install Pygments
.
/Users/user/.local├── bin│ ├── pipsi -> /Users/user/.local/venvs/pipsi/bin/pipsi│ └── pygmentize -> /Users/user/.local/venvs/pygments/bin/pygmentize├── share│ └── virtualenvs└── venvs ├── pipsi └── pygments
Compared topip install --user
eachPKGNAME
is installed into its own virtualenv, so you don't have to worry about different packages having conflicting dependencies. As long as~/.local/bin
is on your PATH, you can run any of these scripts directly.
$ pipsi install Pygments
$ pipsi install --python /usr/bin/python3.5 hovercraft
$ pipsi uninstall Pygments
$ pipsi upgrade Pygments
$ pipsi list
$ pipsi uninstall pipsi
With 0.5 and later just do this:
$ pipsi upgrade pipsi
On older versions just uninstall and reinstall.