简体   繁体   中英

How to download or install Gitlib as a standalone library with recent versions of pip?

This is a very simple problem, but I'm completely stuck on how to solve it. I couldn't even found a way for just downloading.
The website don't give anything for downloading it outside pypi and without smug.

$ pip install --allow-external gitlib gitlib
Collecting gitlib
  Could not find a version that satisfies the requirement gitlib (from versions: )
  Some insecure and unverifiable files were ignored (use --allow-unverified gitlib to allow).
No matching distribution found for gitlib

Using the required options doesn't solve the problem.

$ pip install --allow-all-external --allow-unverified gitlib gitlib==0.5
Collecting gitlib==0.5
  Could not find a version that satisfies the requirement gitlib==0.5 (from versions: )
No matching distribution found for gitlib==0.5

Pypi is only a list of registered projects -- if the package is listed at a download URL, you will need to follow that path to get the actual code to install.

In your case, you could git clone or pip install from git://mcnabbs.org/smug.git. If there's issues cloning or downloading, that's not something anyone here would be able to help you out with -- the package maintainer has decided to self-host his code.

More generally, pip interacts with pypi. Pypi is a package index for code that is not in the standard library. Much of this code is third-party/non-official. It's important to note that there is no promise of quality, functionality, or ability to install this code directly from pip.

In the case of "Gitlab" as per pypi , there's no promise that the code is actually true to its marketing of being a "Pythonic low-level Git library", there's no guarantee that the download URL is direct (or correct or even working), and it's a perfect example of the value of knowing that this information is maintained by the person that registered that package on pypi.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM