pipenv only recognizing first source in pipfile

62 Views Asked by At

Edit: following this post, using pipenv==2022.1.8 did work, looking into why, may have to do with https://github.com/pypa/pipenv/issues/5021

I am currently running python 3.10.12, with pipenv, version 2022.4.8, although I have tried 2023.11.15 with same results. My pipfile lists two sources, and my packages are list which which index they are using

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

[[source]]
name = "artifactory"
url = "some private URL my company uses"
verify_ssl= true

[dev-packages]
package1 = {version = "==2.2.10", index = "artifactory"}

[packages]
protobuf = {version = "==4.21.6", index = "pypi"}
grpcio = {version = "==1.54.0", index = "pypi"}
grpcio-tools = {version = "==1.54.0", index = "pypi"}
package2 = {version = "==4.20.69", index = "artifactory"}
etc...

However, When I run anything like pipenv lock to create a new pipfile.lock after updating some of the versions, if the source order is

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

[[source]]
name = "artifactory"
url = "some private URL my company uses"
verify_ssl= true

it will give errors: No matching distribution found for package1 (from versions: none)

If I reverse the order

[[source]]
name = "artifactory"
url = "some private URL my company uses"
verify_ssl= true

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

it will give errors: No matching distribution found for protobuf (from versions: none) or one of the other packages. I have tried in the past to make the pipfile only one index and removing the other index, it would build.

Tried difference pipenv and python3 versions, and tried removing the index for packages ( the file originally didnt have any index specification)

0

There are 0 best solutions below