-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv only recognizing first source in pipfile #6061
Comments
This may not help your problem, but it's usually possible to configure Artifactory to fetch 3rd party packages on demand, so you may be able to just use Artifactory in this case. |
Do you have any sub-dependencies that need to be pulled from the secondary index which are not listed in the Pipfile? |
@matteius I dont think I do |
Well that is the logical explanation, can you run with |
The other possibility is that two two libraries require things that are conflicting so the resolver excludes one of them as being possible. |
I have this same issue, or a set of related issues, anyway. My private package has dependencies on publicly listed packages, and pipenv cannot seem to find them, despite pip having no similar issues. Currently running For example, my private package (call it
expected results
unexpected results
expected results
unexpected results
However I've got my I also attempted to define which index to use for which packages using the |
This did help the issue, thanks for the suggestion. I was able to configure a remote repository in Artifactory that just passes through requests to the public pypi w/o caching them. With that in place I can remove the public pypi from the Pipfile. However it still fails in the locking phase w/ |
I have the same issue, and try to switch sources. If the private source is the first place, then ''No matching distribution found for public packages", otherwise " No matching distribution found for private packages". My solution is to demand our IT to sync the public packages, but I think this is not the right way. As my opinion, "Mix sources" is an important feature of pipenv. |
yeah we've resorted to adding this to the
along with the internal packages listed in that then running
to update an environment. works, but definitely not ideal |
This is essentially by design at this point as a security feature -- the first source in Pipfile is treated as default, and any other package source must be explicitly called out: https://pipenv.pypa.io/en/latest/indexes.html#index-restricted-packages |
Issue description
Edit: following this post, using pipenv==2022.1.8 did work, looking into why, may have to do with #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
But when I run pipenv lock it only looks at the first source
Expected result
generate pipfile.lock with correct versioning and sha
Actual result
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)
I have tried turning on and off
install_search_all_sources = true
Steps to replicate
$ pipenv --support
Pipenv version:
'2022.4.8'
Pipenv location:
'/Users/david.li2/.pyenv/versions/3.10.12/lib/python3.10/site-packages/pipenv'
Python location:
'/Users/david.li2/.pyenv/versions/3.10.12/bin/python3'
Python installations found:
3.10.13
:/Users/david.li2/.pyenv/versions/3.10.13/bin/python3
3.10.12
:/Users/david.li2/.pyenv/versions/3.10.12/bin/python3
3.10.12
:/Users/david.li2/.pyenv/versions/3.10.12/bin/python3
3.10.12
:/Users/david.li2/.pyenv/versions/3.10.12/bin/python
3.10.11
:/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
3.10.11
:/usr/local/bin/python3
3.9.6
:/usr/bin/python3
3.6.15
:/Users/david.li2/.pyenv/versions/3.6.15/bin/python3
PEP 508 Information:
System environment variables:
MANPATH
DD_KAFKA_SSL_CA_LOCATION_STAGING_00
PYENV_ROOT
NVM_CD_FLAGS
TERM
SHELL
PIP_EXTRA_INDEX_URL
HOMEBREW_REPOSITORY
TMPDIR
GOBIN
TERM_SESSION_ID
JENV_FORCEJAVAHOME
PYENV_VERSION
NVM_DIR
USER
DD_KAFKA_BOOTSTRAP_SERVERS_STAGING_00
COMMAND_MODE
ARTIFACTORY_USERNAME
SSH_AUTH_SOCK
PYENV_DIR
__CF_USER_TEXT_ENCODING
HOMEBREW_GITHUB_PACKAGES_TOKEN
PATH
TERMINAL_EMULATOR
LaunchInstanceID
ARTIFACTORY_URL
__CFBundleIdentifier
JENV_LOADED
PWD
JAVA_HOME
HOMEBREW_GITHUB_API_TOKEN
EDITOR
PYENV_HOOK_PATH
artifactoryUser
XPC_FLAGS
JENV_FORCEJDKHOME
XPC_SERVICE_NAME
PYENV_SHELL
JDK_HOME
SHLVL
HOME
GOROOT
DD_KAFKA_USERNAME_STAGING_00
HOMEBREW_PREFIX
IDEA_INITIAL_DIRECTORY
LOGNAME
JENV_SHELL
artifactoryPassword
LC_CTYPE
GOPATH
INFOPATH
HOMEBREW_CELLAR
ARTIFACTORY_PASSWORD
SECURITYSESSIONID
DD_KAFKA_PASSWORD_STAGING_00
PIP_SHIMS_BASE_MODULE
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/david.li2/.pyenv/versions/3.10.12/bin:/opt/homebrew/Cellar/pyenv/2.3.35/libexec:/opt/homebrew/Cellar/pyenv/2.3.35/plugins/python-build/bin:/Users/david.li2/.pyenv/shims:/opt/homebrew/opt/icu4c/sbin:/Users/david.li2/.jenv/bin:/Users/david.li2/.local/bin:/Users/david.li2/.jenv/shims:/Users/david.li2/.jenv/bin:/Applications/IntelliJ IDEA CE.app/Contents/MacOS:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/munki:/Users/david.li2/bin:/Users/david.li2/go/bin:/opt/homebrew/opt/go/libexec/bin:/Users/david.li2/bin
SHELL
:/bin/zsh
EDITOR
:subl -w
PWD
:/Users/david.li2/Projects/catalog-service/pulse
Contents of
Pipfile
('/Users/david.li2/Projects/catalog-service/pulse/Pipfile'):Contents of
Pipfile.lock
('/Users/david.li2/Projects/catalog-service/pulse/Pipfile.lock'):The text was updated successfully, but these errors were encountered: