question-mark
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.

Dependency resolution failure: pip works but poetry cannot install turicreate 6.4.1

See original GitHub issue
  • 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).

  • OS version and name: <OS X as well as Ubuntu 18.04–>

  • Poetry version: 1.1.0b2 & 1.1.0rc1

  • Link of a Gist with the contents of your pyproject.toml file: gist contains pyproject toml + result of poetry add -vvv turicreate=6.4.1

Issue

poetry does not correctly resolve the dependencies for turicreate whereas pip does.

turicreate version 6.4.1 depends on coremltools version 4.0b3. This can be seen by downloading the 3.8 wheel and inspecting:

$ pkginfo -f requires_dist turicreate-6.4.1-cp38-cp38-manylinux1_x86_64.whl
requires_dist: ['decorator (>=4.0.9)', 'numpy', 'pandas (>=0.23.2)', 'pillow (>=5.2.0)', 'prettytable (==0.7.2)', 'resampy (==0.2.1)', 'requests (>=2.9.1)', 'scipy (>=1.1.0)', 'six (>=1.10.0)', 'coremltools (==4.0b3)', 'tensorflow (>=2.0.0)', 'numba (<0.51.0)']

poetry add coremltools=4.0b3 works as expected. However, the problem comes with poetry add turicreate=6.4.1:

Updating dependencies
Resolving dependencies... (0.1s)

  SolverProblemError

  Because turicreate (6.4.1) depends on coremltools (3.3)
   and  depends on coremltools (4.0b3), turicreate is forbidden.
  So, because  depends on turicreate (6.4.1), version solving failed.

  at ~/.poetry/lib/poetry/puzzle/solver.py:241 in _solve
      237β”‚             packages = result.packages
      238β”‚         except OverrideNeeded as e:
      239β”‚             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240β”‚         except SolveFailure as e:
    β†’ 241β”‚             raise SolverProblemError(e)
      242β”‚
      243β”‚         results = dict(
      244β”‚             depth_first_search(
      245β”‚                 PackageNode(self._package, packages), aggregate_package_nodes

In contrast, pip install turicreate=6.4.1 works as expected.

$ pip install turicreate==6.4.1
Collecting turicreate==6.4.1
  Downloading turicreate-6.4.1-cp38-cp38-manylinux1_x86_64.whl (92.0 MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 92.0 MB 29 kB/s
...
Collecting coremltools==4.0b3
  Downloading coremltools-4.0b3-py3-none-any.whl (4.6 MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4.6 MB 2.3 MB/s
...

Why does poetry not find the correct dependency when pip does 😭 ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
malcolmgreavescommented, Oct 3, 2020

Thank you so much for your help! πŸ™

1reaction
abncommented, Oct 2, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

pip dependency resolver does not currently - You.com | The search ...
ERROR : pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of...
Read more >
Error installing Turicreate on ubuntu python 3.8.2 on pip
It works fine on Ubuntu 20.04 and Ubuntu 16.04 and is a good alternative for using turicreate as long as python3.8 support is...
Read more >
understanding and enhancing mixed sample data augmentation ...
The function only expected 3 arguments. This import failed. That key does not exist. The number of elements in the two lists isn't...
Read more >
Error installing Turicreate on ubuntu python 3.8.2 on pip
Turicreate doesn't support Python 3.8 anycodings_ubuntu-20.04 yet. You have to use an earlier python anycodings_ubuntu-20.04 version (e.g 3.7) to getΒ ...
Read more >
poetry - 쒅속성 ν•΄κ²° μ‹€νŒ¨ : pipλŠ” μž‘λ™ν•˜μ§€λ§Œμ‹œλŠ” turicreate 6.4.1을 ...
OS 버전 및 이름 : μ‹œ 버전 : 1.1.0b2 & 1.1.0rc1; Gist 와 pyproject.toml 파일의 μ½˜ν…μΈ  링크 : gistμ—λŠ” pyproject toml + κ²°κ³Ό...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found