Poetry: Running poetry install should not install the current project into site-packages

Created on 27 Aug 2019  路  3Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] 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


From time to time I clean out the installed packages by running "pip freeze | xargs pip uninstall -y" to make sure I have the necessary packages added to pyproject.toml file via poetry. When I run poetry install, it will install all the dependencies but it also creates a .egg-info and installs my project into the site-packages. I then have to run pip uninstall project-name to uninstall my current project.

This doesn't seem correct since i'm not creating a build. If I run poetry update, only the dependencies are installed, but all package versions are also updated.

Running poetry install should only install the project dependencies, not install the current project into the site packages.

I have run poetry self:update and it will only update to version 0.12.17 and will not update to 1.0.0b1

Most helpful comment

@brycedrennan Please reopen this issue for discussion.

The default behavior should not be equivalent to "pip install -e ."

I discovered by reviewing the code that adding the option "--no-root", the current package is not installed as a dependency. "poetry install --no-root"

Unfortunately, this is not able to be configured as the default, and allowing the addition of the "-e" option to mimic the behavior of "pip install -e ."

All 3 comments

This is very similar to https://github.com/sdispater/poetry/issues/1301 so I'm closing this as duplicate. I encourage you to put a :+1: on that issue and add any thoughts you have there.

While it's slightly related, it's a different issue.
The install command states that it reads the pyproject.py dependencies and installs them.

The project is not a dependency to itself. If the current package is to be installed then that's a local deployment, not dependency install.

@brycedrennan Please reopen this issue for discussion.

The default behavior should not be equivalent to "pip install -e ."

I discovered by reviewing the code that adding the option "--no-root", the current package is not installed as a dependency. "poetry install --no-root"

Unfortunately, this is not able to be configured as the default, and allowing the addition of the "-e" option to mimic the behavior of "pip install -e ."

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikaro picture nikaro  路  3Comments

probablykasper picture probablykasper  路  3Comments

jhrmnn picture jhrmnn  路  3Comments

thmo picture thmo  路  3Comments

ghost picture ghost  路  3Comments