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.

An error occurred while installing <non-pypi packagename>

See original GitHub issue

Using pipenv version 8.2.6 with a Pipfile containing references to packages that are served from non-PyPi [[source]]s results in a recoverable error. Given a Pipfile like this, where requests comes from the public PyPi and (for the sake of example) secret-sauce comes from on-prem-pypi.company.com:

[[source]]
url = "https://on-prem-pypi.company.com"
verify_ssl = true

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages]
requests = "*"
secret-sauce = "==1.2.3"

Running pipenv install results in output like:

Pipfile.lock not found, creating…
Locking [packages] dependencies…
Updated Pipfile.lock (a1679f)!
Installing dependencies from Pipfile.lock (a1679f)…
An error occurred while installing secret-sauce==1.2.3! Will try again.
Installing initially–failed dependencies…
Success installing secret-sauce==1.2.3! — 00:00:00

It seems as though the initial failure was because pipenv failed to find secret-sauce on PyPi, which makes sense, but would it be possible or pipenv to check all sources before emitting the error? It’s unsettling to see errors when in fact everything is fine once the appropriates sources are contacted.

Or, perhaps even better and more secure: Is it possible to declare that secret-sauce only comes from on-prem-pypi.company.com to avoid contacting other sources entirely? Without such a declaration, it would be possible for an attacker to claim secret-sauce after-the-fact on PyPi and potentially run unexpected code on systems that expected secret-sauce to be fetched from a different source.

Thanks for a great project!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Ymbirttcommented, Mar 26, 2018

Whoops! Looks like it’s moved again. Check out https://docs.pipenv.org/advanced/#specifying-package-indexes

0reactions
techalchemycommented, Jun 7, 2018

I’m kind of sure this was a race condition of some kind. Either way this technically does work. It might work better in master

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Error Occurred While Installing a Package in NIPM - NI
While installing software through NI Package Manager (NIPM), I get one of the following error messages: An error occurred while installing a ...
Read more >
ERROR conda.core.link:_execute(699): An error occurred ...
1. If you have anaconda, then matplotlib is already installed by default, unless this is miniconda and you're installing on a raspberry pi...
Read more >
Installing Python Dependencies in Dataflow | Google Cloud
In this article, we will look into 3 dependency options in PipelineOptions and Customer Container. And then, we will see some known issues...
Read more >
Installing Packages : TechWeb - Boston University
The intention is to cause an installation of one of these packages if the package name is mistyped during installation by a user....
Read more >
Packages installed from PyPI cannot depend on packages ...
I'm getting this error when I try to install a package I have released to PyPI ... to the user why they are...
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