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.

Forced use of --allow-external and --allow-unverified very inconvenient and not very intuitive

See original GitHub issue

Recently, I tried to install a module and got the following error message:

(virtualenv) C:\[snip]\trunk>pip install pypyodbc
Downloading/unpacking pypyodbc
  Could not find any downloads that satisfy the requirement pypyodbc
  Some externally hosted files were ignored (use --allow-external pypyodbc to allow).
Cleaning up...
No distributions at all found for pypyodbc
Storing debug log for failure in C:\Users\[snip]\pip\pip.log

I immediately tried to following command and was confused by the output:

(virtualenv) C:\[snip]\trunk>pip install --allow-external pypyodbc
You must give at least one requirement to install (see "pip help install")

A moment of Googling and reading some documention helped clear up the issue and I settled on this command rather than duplicate the package name:

(virtualenv) C:\[snip]\trunk>pip install --allow-all-external pypyodbc
Downloading/unpacking pypyodbc
  Could not find any downloads that satisfy the requirement pypyodbc
  Some insecure and unverifiable files were ignored (use --allow-unverified pypyodbc to allow).
Cleaning up...
No distributions at all found for pypyodbc
Storing debug log for failure in C:\Users\[snip]\pip\pip.log

At this point, I was rather annoyed, and I tried to use an “all” variant of the --allow-unverified argument, which of course didn’t exist:

(virtualenv) C:\[snip]\trunk>pip install --allow-all-external --allow-all-unverified pypyodbc

Usage:
  pip install [options] <requirement specifier> ...
  pip install [options] -r <requirements file> ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --allow-all-unverified

I finally got it to work with --allow-unverified pypyodbc, but I feel this was a very poor user experience. I checked, and using --allow-unverified by itself doesn’t work:

(virtualenv) C:\[snip]\trunk>pip install --allow-unverified pypyodbc pypyodbc
Downloading/unpacking pypyodbc
  Could not find any downloads that satisfy the requirement pypyodbc
  Some externally hosted files were ignored (use --allow-external pypyodbc to allow).

Having to type out both arguments seems unnecessarily bulky and tedious to me. I understand the value in having the ability to be more specific, but I suspect that in 99% of the use cases where this is an issue, users will want to bypass both. As such, there should be a combined argument that tells pip “I don’t care about the security right now. Just install this.” I haven’t come up with a good name for such an argument, but there should probably be individual and all variants of this argument. If users using such an argument with poor judgement is considered to be an issue, I would point out the “We’re all adults here” mentality set forth by the Python community.

Furthermore, I think the error message could be improved. It was not immediately obvious to me that the error message was suggesting I repeat the package name with the argument. It may be worthwhile to suggest an entire command line so that this is clear, or perhaps suggesting the all variant in addition to the package variant will make more clear that the package name is part of the argument.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:43 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
anirudhp2014commented, Dec 9, 2015

–allow-external never worker for me .

1reaction
mjalldaycommented, Jun 9, 2014

can someone please update this with how to solve this issue when specifying dependencies in setup.py?

moving to requirements.txt does not seem like a good solution since I don’t then understand how to specify dependencies for anything we have that depends on the package that moves to requirements.txt.

googling this issue continues to bring up this github thread which only discusses the ramifications, not the solution (for me anyway).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Heroku setup pip fail - python
While pip is no longer allowed to install packages that are not hosted on PyPI ... Forced use of --allow-external and --allow-unverified very...
Read more >
Five Traits of Highly Intuitive People
Highly intuitive people make decisions that had not been thought out carefully; they make choices that have arisen quickly out of instinct. Scientific...
Read more >
Beam Energy Dependence of Dielectron Production in Au+Au ...
Significant progress in this non-perturbative regime has most successfully been ... butions rendering them unsuitable for the use in quality assurance (QA).
Read more >
2014-May.txt - Python mailing list
We already have --allow-unverified and a default of not allowing unverified downloads. I'm arguing that we don't need a second set of flags, ......
Read more >
Beam Energy Dependence of Dielectron Production in Au ...
Significant progress in this non-perturbative regime has most ... butions rendering them unsuitable for the use in quality assurance (QA).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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