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.

Package in private repo with same name as one from Pypi

See original GitHub issue

I have a package in a private repository with the same name as one from PyPi. The PyPi one, having a higher version number, always get installed.

url = ""
verify_ssl = true
name = "myrepo"

url = ""
verify_ssl = true
name = "pypi"

mypkg = ">=0.0.1"

python_version = "3.6"

Is there a way to define that a package comes from a certain private repo?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

seglbergcommented, May 11, 2018

This seems to be the same/similar issue I raised in #2102. Personally I think the current syntax is confusing because when I specify mypkg = {version: ">=0.0.1", index="myrepo"} I logically expect it to use myrepo only and disregard pypi.

I totally understand the behavior was changed to match --extra-index-url, but there is a big enough disconnect between pip and pipenv (in my mind) that I expected different behavior. I was excited at the idea of better and more simplified controls over where and how packages are downloaded for our projects.

prcastrocommented, May 9, 2018

I would find more intuitive to always search in the source order defined in the Pipfile, unless a specific index is specified on the dependency.

In my case mypkg = {version: ">=0.0.1", index="myrepo"} would only search in myrepo while mypkg = ">=0.0.1" would search first in myrepo and then in pypi, getting the newest version, since this is the source order defined on the Pipfile.

However, maybe one would like to change the source order in a per-dependency basis. Then, one could add an extra_index key, so mypkg = {version: ">=0.0.1", index="pypi", extra_index="myrepo"} would search first on pypi and then on myrepo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Private PyPI containing package with same name
I am setting up my own PyPI containing some private packages. The problem is that some of the private packages have the same...
Read more >
Installing Private Python Packages - Read the Docs
Read the Docs uses pip to install your Python packages. If you have private dependencies, you can install them from a private Git...
Read more >
Create Your Custom, private Python Package That You Can ...
Create Your Custom, private Python Package That You Can PIP Install From Your Git Repository. Share your self-built Python package using your ...
Read more >
PyPI as a Project repository vs. Name registry (a.k.a. PyPI ...
I feel that currently, PyPI has a bit of a split identity. Per PEP 541, it tries to be purely a repository of...
Read more >
PyPI packages in the Package Registry - GitLab Docs
GitLab looks for packages that use Python normalized names (PEP-503). The characters - , _ , and . are all treated the same,...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found