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

倖福魔咒の 提交于 2019-12-23 22:08:06

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/33216515/how-to-download-or-install-gitlib-as-a-standalone-library-with-recent-versions-o

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!