poetry: pip 19.1 breaks Poetry

  • 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

After upgrading pip to version 19.1 (relased 5 hours ago), I can’t install my projects using poetry anymore:

abilian-core ❯ poetry install
Installing dependencies from lock file

Nothing to install or update

  - Installing abilian-core (0.11.0-dev)
A setup.py file already exists. Using it.

[EnvCommandError]
Command ['/Users/fermigier/.virtualenvs/abilian-core/bin/pip', 'install', '-e', '/Users/fermigier/projects/abilian-core',
 '--no-deps'] errored with the following output:
Obtaining file:///Users/fermigier/projects/abilian-core
ERROR: Error installing 'file:///Users/fermigier/projects/abilian-core': editable mode is not supported for pyproject.toml-style projects. This project is being processed as pyproject.toml-style because it has a pyproject.toml file with a "build-backend" key in the "build_system" value. See PEP 517 for the relevant specification.

install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]

(Downgrading pip to 19.0.3 restores the usual behavior).

Not sure if it’s a pip or a poetry issue, but I’m posting it here so that poetry users are aware of the issue.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 24
  • Comments: 28 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I have an open PR that addresses this issue. Please give it some 🎉 , maybe someone will notice it then

This is intentional Pip behavior. They implemented it knowing full well it would break Poetry (see https://github.com/pypa/pip/issues/6314).

Basically, if you have a build-system defined in your pyproject.toml, Pip won’t let you install in editable mode, because technically that isn’t supported by PEP-517.

There’s also a Poetry issue #826 that addresses it, though the title should probably be updated to be easier to find.

Commenting out the build system piece of your pyproject.toml or using older versions of Pip are current workarounds. Note that the underlying issue of conflicting backend dependencies will happen even on Pip 19.0.3

Worked fine with python==3.7.3, poetry==0.12.14 and pip==19.1

In our case automated tests of python package using tox failed as tox is pulling the latest pip.

Workaround is using tox-pip-version plugin allowing to declare pip to be installed into tox created virtualenv.

In our case fixing the pip to version 19.0.3 fixed the problem (so our experience differers from the one of @dbanty ).

Ok, somehow I missed upgrading to 0.12.15.

Thanks for your reply. After upgrading, I cleared out the old virtualenv, cloned ‘project Z’, and tried to install and was successful. I did have to upgrade poetry’s pip, but I’m not sure if that is because of something in my setup. Anyway, here were my steps in case someone finds it helpful.

irf@metroplex:~/tmp/hippo-appserver$ git checkout develop
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
Switched to a new branch 'develop'
irf@metroplex:~/tmp/hippo-appserver$ pyenv local 3.6.7
irf@metroplex:~/tmp/hippo-appserver$ which python
/home/irf/.pyenv/shims/python
irf@metroplex:~/tmp/hippo-appserver$ which pip
/home/irf/.pyenv/shims/pip
irf@metroplex:~/tmp/hippo-appserver$ pip --version
pip 19.1.1 from /home/irf/.pyenv/versions/3.6.7/lib/python3.6/site-packages/pip (python 3.6)
irf@metroplex:~/tmp/hippo-appserver$ poetry run pip --version
Creating virtualenv hippo-appserver-py3.6 in /home/irf/.cache/pypoetry/virtualenvs
pip 10.0.1 from /home/irf/.cache/pypoetry/virtualenvs/hippo-appserver-py3.6/lib/python3.6/site-packages/pip (python 3.6)
irf@metroplex:~/tmp/hippo-appserver$ poetry run pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-19.1.1
irf@metroplex:~/tmp/hippo-appserver$ poetry install 

The install was successful, including the git repo (‘project Y’).

For me works with setup reported by @dsevero, doesn’t work if I have poetry==0.12.15.

@ape364 CI scripts shall have deterministic environment to run (as much as is feasible). For this reason we run our CI jobs for python packages (in GitLab) using docker image with pre-installed tox, poetry and devpi commands.

Anyway, even with this setup we have failed as tox pulled the latest pip which broke the job. This we have fixed adding tox-pip-version tox plugin allowing to fix pip to known version.

still facing this issue travis log how to fix this?

Fixed in 0.12.13.