Skip to content
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

Different behavior when installing packages from a private repo than pypi #7814

Closed
4 tasks done
jzazo opened this issue Apr 19, 2023 · 5 comments
Closed
4 tasks done
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@jzazo
Copy link

jzazo commented Apr 19, 2023

  • Poetry version: 1.4.2
  • Python version: 3.10.6
  • OS version and name: Ubuntu 20.04
  • pyproject.toml:
[tool.poetry]
name = "example"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
torch = "2.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

The above pyproject.toml works and when I do

$ poetry run python
>>> import torch

everything works as expected.

If I add to the pyproject.toml the following info:

[[tool.poetry.source]] name = "my-private-repo" 
url = "https://pkgs.dev.azure.com/..."  # actual url
default = true

Then, poetry does not install pytorch correctly anymore and misses some drivers. It seems as if it does not identify all needed dependencies.

I want to ask if you think this might be an issue with poetry not behaving the same on pypi than on a private repo, or if it might be that devops does not work as pypi? The above has been working with past versions of torch<2.0.0.

Thanks.

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.
@jzazo jzazo added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 19, 2023
@dimbleby
Copy link
Contributor

non-pypi repositories are typically different than pypi repositories

my wild guess would be that this duplicates #4000 etc (the more recent comments are more useful than the older ones)

however without a way to reproduce this it's unlikely that anyone can help you.

@martin-schulze-e2m
Copy link

martin-schulze-e2m commented Apr 17, 2024

I just stumbled upon the same problem when using an Azure feed and created a reproducer that shows the same issue by injecting pypi as a legacy repo:

[[tool.poetry.source]]
name = "legacy-pypi"
url = "https://pypi.python.org/pypi"

This leads to the dependencies not being installed and being omitted from the poetry.lock (and also being absent in poetry show):

[[package]]
name = "pydantic"
version = "2.7.0"
description = ""
optional = false
python-versions = "*"
files = [
    {file = "pydantic-2.7.0-py3-none-any.whl", hash = "sha256:9dee74a271705f14f9a1567671d144a851c675b072736f0a7b2608fd9e495352"},
    {file = "pydantic-2.7.0.tar.gz", hash = "sha256:b5ecdd42262ca2462e2624793551e80911a1e989f462910bb81aef974b4bb383"},
]

[package.source]
type = "legacy-pypi"
url = "https://pypi.python.org/pypi"
reference = "legacy"

We use the Azure feed as a transparent mirror for PyPI, so all packages should go through that. Nevertheless, I got a workaround when setting ("normal") PyPI as the source for the affected package.

@dimbleby Should I post that over at the other issue (#4000)? I think its a slightly different constellation.

@dimbleby
Copy link
Contributor

No, you are duplicating #9130, #9191, #9195, #9244, #9266, #9272, #9288, #9294, #9301.

This one should likely be closed, the reporter has never come back and there is not enough here to say anything useful.

@jzazo jzazo closed this as completed Apr 17, 2024
@martin-schulze-e2m
Copy link

Thanks for your fast response. Just for future reference, following steps fixed it (although I did a fresh pipx install of poetry before?):

poetry self lock
poetry self install
poetry cache clear <affected_repo> --all

I think that I missed the cache clear part when I reinstalled. Anyways, it is working now, thanks again!

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants