question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support installing from Git URLs

See original GitHub issue
pip install https://github.com/pypa/pip.git
Downloading/unpacking https://github.com/pypa/pip.git
  Downloading pip.git (47Kb): 47Kb downloaded
  Cannot unpack file /tmp/pip-54rGHd-unpack/pip.git (downloaded from /tmp/pip-Kc8M8w-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /tmp/pip-Kc8M8w-build

The proposed workaround is to detect if failed URLs ends with .git and try to use git (or dulwich) to get content from it if everything else fails.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
dulycommented, Mar 29, 2014

If the stack traces are reported then this is the ideal situation. In most cases it won’t. As developers we can only handle known exceptions. If an unknown exception occurs we can only address the issue if the user reports it. Iterating through known requirements establishes a protocol and procedure. If that procedure needs to be readdressed at a later time then that’s what we should do. In this case, requiring git+ for all git URLs is a requirement that is causing a common issue due to the way GitHub has structured their HTTP Secure git clone URLs. It is in our opinion that pip should detect the URL extension and add the VCS information if it is in fact a GitHub URL. @dstufft believes otherwise and we respect his opinion. @pnasrat suggested that user instructions be added. @techtonik confirms that pip should auto-detect. @Ivoz believes that pip accepts too many package types already. We should add functionality not remove it while being explicit in the process. (Note: To us this means that we should readdress pip’s documentation.)

We are working on an internal solution. If we have any pull requests we will certainly initiate those in the future.

0reactions
Ivozcommented, Mar 29, 2014

Just chucking pip a url and “hoping it will figure out what to do with it after trying x different things” is bad, implicit design, and as already suggested it makes useful error reporting insane. Explicitness is better. I think pip already accepts too many valid formats of package requirements using the single command pip install <requirement> - with many different valid forms of what <requirement> could be, and this is already the cause of many cases where pip will simply print a stack trace instead of a useful error message.

Unfortunately there’s obviously backwards compatibility to consider so we don’t have license to rewrite things wholesale.

maybe there is a problem in its architecture?

Then that (ideally) should be fixed first, before adding to the problems it causes. Pull requests welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing from a Git URL - Unity - Manual
Installing from a Git URL · Open the add menu in the Package Manager's toolbar. · The options for adding packages appear.
Read more >
Installing from a Git URL - Unity Manual
Installing from a Git URL · Click the add button in the status bar. · The options for adding packages appear. Add package...
Read more >
1.5 Getting Started - Installing Git
The most official build is available for download on the Git website. Just go to https://git-scm.com/download/win and the download will start automatically.
Read more >
About remote repositories - GitHub Docs
A remote URL is Git's fancy way of saying "the place where your code is stored ... You can also install GitHub CLI...
Read more >
How to install an npm package from GitHub directly
There is also support for installing directly from a Gist, Bitbucket, GitLab, ... As of September 2016, installing from vanilla HTTPS GitHub URLs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found