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

Setting a default repository breaks dependency resolution for some packages. #2418

Closed
3 tasks done
joel-wright opened this issue May 14, 2020 · 8 comments
Closed
3 tasks done
Labels
area/repo Meta-issues for the repository/forge itself kind/bug Something isn't working as expected

Comments

@joel-wright
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Setting default = true in [[tool.poetry.source]] for my private pypi repository mirror breaks dependency resolution for scikit-learn. I have recreated the behaviour by providing a named default pointing to the pypi simple index.

Using the above pyproject.toml, poetry add scikit-learn finds no dependencies & installs only the scikit-learn package, and my poetry.lock includes a [package.source] for my explicit default.

Removing default = true gives the correct dependencies (numpy, scipy, joblib & threadpoolctl), but the poetry.lock file does not use my default for any of the packages.

@joel-wright joel-wright added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 14, 2020
@joel-wright joel-wright changed the title Setting default = true for my private repository breaks dependency resolution for some packages. Setting a default private repository breaks dependency resolution for some packages. May 14, 2020
@joel-wright joel-wright changed the title Setting a default private repository breaks dependency resolution for some packages. Setting a default repository breaks dependency resolution for some packages. May 16, 2020
@guderkar
Copy link

I got same problem even without default=true

The problematic package is 'cvxopt'. It depends on 'mkl' and 'intel-openmp'

When I do 'poetry add cvxopt' it install only the cvxopt package and not the dependecies.

@huntzhan
Copy link

huntzhan commented Aug 27, 2020

Got same issue here. Looks like the latest version (poetry==1.0.10) has resolved this issue.
Even if upgrading to the latest version (poetry==1.0.10), this issue still exists.

@finswimmer finswimmer added the area/repo Meta-issues for the repository/forge itself label Aug 27, 2020
@louwers
Copy link

louwers commented Sep 14, 2020

Duplicate: #1160

@yousefissa
Copy link

Anyone found a fix for this yet? Still experiencing with poetry==1.0.10

@abn
Copy link
Member

abn commented Oct 19, 2020

I am unable to reproduce this issue with 1.1.3.

$ podman run --rm -i --entrypoint bash python:3.8 <<EOF
> set -e
> python -m pip install -q poetry
> install -d foobar
> pushd foobar
> curl -sLO https://gist.githubusercontent.com/joel-wright/a92d10e84a46a35ca33764d8bb3210a4/raw/48d72688838a850f18e09b8c8fc953818d4d0f9e/pyproject.toml
> poetry add scikit-learn
> EOF
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
/foobar /
Creating virtualenv test-default-lWDpn5M1-py3.8 in /root/.cache/pypoetry/virtualenvs
Using version ^0.23.2 for scikit-learn

Updating dependencies
Resolving dependencies...

Writing lock file

Package operations: 5 installs, 0 updates, 0 removals

  • Installing numpy (1.19.2)
  • Installing joblib (0.17.0)
  • Installing scipy (1.5.3)
  • Installing threadpoolctl (2.1.0)
  • Installing scikit-learn (0.23.2)

@Korijn
Copy link

Korijn commented Aug 25, 2021

Could also be caused by #4439

@abn
Copy link
Member

abn commented May 18, 2022

This seems to be an issue with metadata identification that was resolved in latest poetry release. You could also try the version on master.

Note that your project must use python = "~3.9" or similar to use the pre-built wheels as scipy might not have the wheels available.

Install Poetry from VCS

pipx install --force --suffix=@git 'poetry @ git+https://github.com/python-poetry/poetry.git'
alias poetry=poetry@git
poetry new foobar
cd foobar
poetry source add --default pypi-simple https://pypi.org/simple/
poetry add scikit-learn

You can also try poetry --no-cache add scikit-learn to ensure there are no cache issues.

@abn abn closed this as completed May 18, 2022
@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 11, 2022
Copy link

github-actions bot commented Mar 1, 2024

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 Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/repo Meta-issues for the repository/forge itself kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

9 participants