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.

editable mode installation with poetry v1.1.4 leads to raise of incompatibility assertion

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).

Issue

I tried to create a venv with the project installed in editable mode by adding

[tool.poetry.dependencies]
mvp-end-device-agent = { "path" = ".", develop = true }

to my pyproject.toml.

My poetry.toml looks like this (creates the venv in the project directory mvp-end-device-agent/.venv):

[virtualenvs]
in-project = true

If I try to create the venv I get this:

D:\mvp-end-device-agent>poetry install
Updating dependencies
Resolving dependencies...

  AssertionError



  at d:\python\python386\lib\site-packages\poetry\mixology\incompatibility.py:60 in __init__
       56│                     # intersection, they're mutually exclusive, making this incompatibility
       57│                     # irrelevant, since we already know that mutually exclusive version
       58│                     # ranges are incompatible. We should never derive an irrelevant
       59│                     # incompatibility.
    →  60│                     assert by_ref[ref] is not None
       61│                 else:
       62│                     by_ref[ref] = term
       63│
       64│             new_terms = []

The -vvv output version can be found here: https://gist.github.com/fkromer/8503fa348631c02ec8748e819938c8ad .

It seems like there is a conflict between the implicit installation of the project/root package as stated in the the command line help (--no-root option)

D:\mvp-end-device-agent>poetry install -h
USAGE
  poetry install [--no-dev] [--no-root] [--dry-run] [--remove-untracked] [-E <...>]

OPTIONS
  --no-dev               Do not install the development dependencies.
  --no-root              Do not install the root package (the current project).
  --dry-run              Output the operations but do not execute anything (implicitly enables --verbose).
  --remove-untracked     Removes packages not present in the lock file.
  -E (--extras)          Extra sets of dependencies to install. (multiple values allowed)

GLOBAL OPTIONS
  -h (--help)            Display this help message
  -q (--quiet)           Do not output any message
  -v (--verbose)         Increase the verbosity of messages: "-v" for normal output, "-vv" for more verbose output and "-vvv" for debug
  -V (--version)         Display this application version
  --ansi                 Force ANSI output
  --no-ansi              Disable ANSI output
  -n (--no-interaction)  Do not ask any interactive question

DESCRIPTION
  The install command reads the poetry.lock file from
  the current directory, processes it, and downloads and installs all the
  libraries and dependencies outlined in that file. If the file does not
  exist it will look for pyproject.toml and do the same.

  poetry install

  By default, the above command will also install the current project. To install only the
  dependencies and not including the current project, run the command with the
  --no-root option like below:

   poetry install --no-root

and the explicit installation via the pyproject.toml.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
fkromercommented, Oct 28, 2020

@sinoroc

[tool.poetry.dependencies]
mvp-end-device-agent = { "path" = ".", develop = true }

Of course this does not make sense. However given my Windows 10 + VSCode + vscode-python extension + poetry setup I was not able to get debugging of a console script based CLA working yet. Until now I was happy with debugging poetry managed CLAs with debuggers like pdbpp. However given the fact that I depend on being able to watch a lot of data in parallel and over time now there is no way around a IDE based debugger. If one is desperate one tries everything possible. 😄 In this case questionable hint from stackoverflow. However you are right that it is an integration issue, probably no poetry specific one.

2reactions
sinoroccommented, Oct 28, 2020

By default poetry installs your project (poetry calls it the root project) as editable.

There should be no need for such a dependency:

[tool.poetry.dependencies]
mvp-end-device-agent = { "path" = ".", develop = true }

I would recommend to remove that line entirely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install a package using pip in editable mode with ...
{py,cfg} files), how can it be installed in editable mode via pip (i.e. python -m pip install -e . )? I tried both...
Read more >
EasyBuild v4.6.2 documentation (release 20221021.0)
The latest version of EasyBuild provides support for building and installing 2,798 different software packages, including 37 different (compiler) toolchains ...
Read more >
Package List — Spack 0.20.0.dev0 documentation
This is a list of things you can install using Spack. It is automatically generated based on the packages in this Spack version....
Read more >
lpm - River Thames Conditions - Environment Agency - GOV.UK
How to setup skype on android, Boarderweek frankreich, Minn kota maxxum 101 for sale, Grudna zlijezda, Head action world cup soccer, Spijkers en...
Read more >
Version 1.4 - Nautobot Documentation
Nautobot v1.4¶. This document describes all new features and changes in Nautobot 1.4. If you are a user migrating from NetBox to Nautobot,...
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