Poetry: Update crashes

Created on 25 Jun 2019  Â·  17Comments  Â·  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.
  • [ x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • Archlinux
  • Poetry 0.12.16

Issue

   1: derived: botocore (>=1.12.175,<1.13.0)
PyPI: 2 packages found for s3transfer >=0.2.0,<0.3.0
PyPI: 7 packages found for jmespath >=0.7.1,<1.0.0
PyPI: No release information found for botocore-1.4.45, skipping
PyPI: 1 packages found for botocore >=1.12.175,<1.13.0
PyPI: Getting info for botocore (1.12.175) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: botocore-1.12.175-py2.py3-none-any.whl
   1: fact: botocore (1.12.175) depends on python-dateutil (>=2.1,<3.0.0)
   1: fact: botocore (1.12.175) depends on jmespath (>=0.7.1,<1.0.0)
   1: fact: botocore (1.12.175) depends on docutils (>=0.10)
   1: fact: botocore (1.12.175) depends on urllib3 (>=1.20,<1.26)
   1: selecting botocore (1.12.175)
   1: derived: docutils (>=0.10)
PyPI: 5 packages found for docutils >=0.10
PyPI: Getting info for s3transfer (0.2.1) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: s3transfer-0.2.1-py2.py3-none-any.whl
   1: fact: s3transfer (0.2.1) depends on botocore (>=1.12.36,<2.0.0)
   1: selecting s3transfer (0.2.1)
PyPI: Getting info for docutils (0.14) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: docutils-0.14-py2-none-any.whl
PyPI: Downloading wheel: docutils-0.14-py3-none-any.whl
   1: selecting docutils (0.14)
PyPI: Getting info for jmespath (0.9.4) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: jmespath-0.9.4-py2.py3-none-any.whl
   1: selecting jmespath (0.9.4)
   1: Version solving took 121.038 seconds.
   1: Tried 1 solutions.

Writing lock file


Package operations: 1 install, 4 updates, 0 removals

  - Installing wheel (0.33.4)
  - Updating torch (1.1.0 -> 1.1.0.post2)

[EnvCommandError]                                                                                                                                                                
Command ['/home/magnus/.cache/pypoetry/virtualenvs/document-classification-py3.7/bin/python', '-m', 'pip', 'install', '--no-deps', '-U', 'torch==1.1.0.post2'] errored with the following output:   
Collecting torch==1.1.0.post2                                                                                                                                                                 
  Could not find a version that satisfies the requirement torch==1.1.0.post2 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.4.1, 0.4.1.post2, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0)           
No matching distribution found for torch==1.1.0.post2                                                                                                                                         
You are using pip version 18.1, however version 19.1.1 is available.                                                                                                                          
You should consider upgrading via the 'pip install --upgrade pip' command.                                                                                                                    

Exception trace:
 /usr/lib/poetry/poetry/_vendor/py3.7/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /usr/lib/poetry/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /usr/lib/poetry/poetry/_vendor/py3.7/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /usr/lib/poetry/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /usr/lib/poetry/poetry/_vendor/py3.7/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /usr/lib/poetry/poetry/_vendor/py3.7/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /usr/lib/poetry/poetry/console/commands/update.py in handle() at line 41
   return installer.run()
 /usr/lib/poetry/poetry/installation/installer.py in run() at line 73
   self._do_install(local_repo)
 /usr/lib/poetry/poetry/installation/installer.py in _do_install() at line 290
   self._execute(op)
 /usr/lib/poetry/poetry/installation/installer.py in _execute() at line 306
   getattr(self, "_execute_{}".format(method))(operation)
 /usr/lib/poetry/poetry/installation/installer.py in _execute_update() at line 361
   self._installer.update(source, target)
 /usr/lib/poetry/poetry/installation/pip_installer.py in update() at line 94
   self.install(target, update=True)
 /usr/lib/poetry/poetry/installation/pip_installer.py in install() at line 91
   self.run(*args)
 /usr/lib/poetry/poetry/installation/pip_installer.py in run() at line 112
   return self._env.run("python", "-m", "pip", *args, **kwargs)
 /usr/lib/poetry/poetry/utils/env.py in run() at line 536
   return super(VirtualEnv, self).run(bin, *args, **kwargs)
 /usr/lib/poetry/poetry/utils/env.py in run() at line 385
   raise EnvCommandError(e)

update [--no-dev] [--dry-run] [--lock] [--] [<packages>]...

(document-classification-py3.7) [magnus@arch document-classification]$ 


My toml thingy

....
[tool.poetry.dependencies]
python = "^3.7"
jupyterlab = "^0.35.4"
click = "^7.0"
tqdm = "^4.32.1"
lumi = { git = "[email protected]:luminovo/lumi.git", branch = "master" }
torch = "^1.1"
torchvision = "^0.2.2"
requests = "^2.22"
joblib = "^0.13.2"
pyocr = "^0.7.0"
pytorch-pretrained-bert = "^0.6.2"
scipy = "^1.3"
...
Bug Dependency resolution stale

Most helpful comment

I'm also getting No matching distribution found for docutils.
Maybe the problem is with .post versions?

[EnvCommandError]
Command ['/Users/wagneraugusto/.pyenv/versions/3.6.8/envs/poetry_lab/bin/python', '-m', 'pip', 'install', '--no-deps', 'docutils==0.15.1'] errored with the followi
ng return code 1, and output:
Collecting docutils==0.15.1
  Could not find a version that satisfies the requirement docutils==0.15.1 (from versions: 0.3, 0.3.5, 0.3.7, 0.3.9, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.9, 0.9.1, 0.
10, 0.11, 0.12, 0.13.1, 0.14rc1, 0.14rc2, 0.14, 0.15, 0.15.1.post1)
No matching distribution found for docutils==0.15.1
You are using pip version 18.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

All 17 comments

I'm having the exact same issue and unfortunately, it is breaking all of my CI pipelines. I am unable to reproduce the issue locally on my MacOS it seems to be an issue on just linux

A temporary workaround would be much appreciated. Attached is my full stack trace. and the pyproject.toml and poetry.lock

Fixing the version to 1.1 instead of ^1.1 works for me.

On 26. Jun 2019, at 00:54, Adithya Balaji notifications@github.com wrote:

A temporary workaround would be much appreciated.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Actually I think I might need to move my problem to a separate issue. It seems that it is somewhat different.

@adithyabsk from the logs here, it does indeed appear to be a different issue and may be related to #1165. Have you tried including an Install pip step in your build?

I will close this issue for now since @magnusja's seems to have been fixed.

I would not necessarily say fixed because I am forcing torch to be 1.1 instead of ^1.1 which makes a difference regarding future bug fix releases of PyTorch right?

@magnusja that's a good point, I'm reopening the issue for now 😅 I did, however try and install the dependencies you've listed in your original issue but it seems to work fine for me:

Updating dependencies
Resolving dependencies... (22.2s)

Writing lock file


Package operations: 63 installs, 0 updates, 0 removals

  - Installing decorator (4.4.0)
  - Installing ipython-genutils (0.2.0)
  - Installing six (1.12.0)
  - Installing attrs (19.1.0)
  - Installing parso (0.5.0)
  - Installing ptyprocess (0.6.0)
  - Installing pyrsistent (0.15.2)
  - Installing traitlets (4.3.2)
  - Installing wcwidth (0.1.7)
  - Installing appnope (0.1.0)
  - Installing backcall (0.1.0)
  - Installing jedi (0.14.0)
  - Installing jsonschema (3.0.1)
  - Installing jupyter-core (4.5.0)
  - Installing markupsafe (1.1.1)
  - Installing pexpect (4.7.0)
  - Installing pickleshare (0.7.5)
  - Installing prompt-toolkit (2.0.9)
  - Installing pygments (2.4.2)
  - Installing python-dateutil (2.8.0)
  - Installing pyzmq (18.0.1)
  - Installing tornado (6.0.3)
  - Installing webencodings (0.5.1)
  - Installing bleach (3.1.0)
  - Installing defusedxml (0.6.0)
  - Installing docutils (0.14)
  - Installing entrypoints (0.3)
  - Installing ipython (7.5.0)
  - Installing jinja2 (2.10.1)
  - Installing jmespath (0.9.4)
  - Installing jupyter-client (5.2.4)
  - Installing mistune (0.8.4)
  - Installing nbformat (4.4.0)
  - Installing pandocfilters (1.4.2)
  - Installing testpath (0.4.2)
  - Installing urllib3 (1.25.3)
  - Installing botocore (1.12.176)
  - Installing ipykernel (5.1.1)
  - Installing nbconvert (5.5.0)
  - Installing prometheus-client (0.7.1)
  - Installing send2trash (1.5.0)
  - Installing terminado (0.8.2)
  - Installing certifi (2019.6.16)
  - Installing chardet (3.0.4)
  - Installing future (0.17.1)
  - Installing idna (2.8)
  - Installing notebook (5.7.8)
  - Installing numpy (1.16.4)
  - Installing s3transfer (0.2.1)
  - Installing boto3 (1.9.176)
  - Installing jupyterlab-server (0.2.0)
  - Installing pillow (6.0.0)
  - Installing regex (2019.06.08)
  - Installing requests (2.22.0)
  - Installing torch (1.1.0.post2)
  - Installing tqdm (4.32.2)
  - Installing click (7.0)
  - Installing joblib (0.13.2)
  - Installing jupyterlab (0.35.6)
  - Installing pyocr (0.7.2)
  - Installing pytorch-pretrained-bert (0.6.2)
  - Installing scipy (1.3.0)
  - Installing torchvision (0.2.2.post3)
  - Installing poetryissue (0.1.0)

Could you add a gist of your pyproject.toml file so that I can make a Docker image with it?

https://gist.github.com/magnusja/366076ae12aa456c7f5b0dea4693e249

Interesting, are you on a Mac by any chance?

Fails in docker FROM python:3.6 on MACOS
``` - Installing torch (1.1.0.post2)

[EnvCommandError]
Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--no-deps', 'torc
h==1.1.0.post2'] errored with the following output:
Collecting torch==1.1.0.post2
ERROR: Could not find a version that satisfies the requirement torch==1.1.
0.post2 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.1, 0.4.0, 0.4.1
, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0)
ERROR: No matching distribution found for torch==1.1.0.post2
```

My pyproject.toml
https://gist.github.com/AlexJoz/eaf73db2e319e84c087044262e50bd8e

I'm also getting No matching distribution found for docutils.
Maybe the problem is with .post versions?

[EnvCommandError]
Command ['/Users/wagneraugusto/.pyenv/versions/3.6.8/envs/poetry_lab/bin/python', '-m', 'pip', 'install', '--no-deps', 'docutils==0.15.1'] errored with the followi
ng return code 1, and output:
Collecting docutils==0.15.1
  Could not find a version that satisfies the requirement docutils==0.15.1 (from versions: 0.3, 0.3.5, 0.3.7, 0.3.9, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.9, 0.9.1, 0.
10, 0.11, 0.12, 0.13.1, 0.14rc1, 0.14rc2, 0.14, 0.15, 0.15.1.post1)
No matching distribution found for docutils==0.15.1
You are using pip version 18.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Here's another datapoint on this issue, it might be a problem with the package maintainer themselves. On pypi the version is listed as 0.15.1 whereas other projects that use the "post" suffix make sure to add that to their actual release version. This seems to be a problem in the way that poetry retrieves the latest version of a package as when you try to do the following on pip:

(test) $ pip install docutils==0.15.1
Collecting docutils==0.15.1
  ERROR: Could not find a version that satisfies the requirement docutils==0.15.1 (from versions: 0.3, 0.3.5, 0.3.7, 0.3.9, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.9, 0.9.1, 0.10, 0.11, 0.12, 0.13.1, 0.14rc1, 0.14rc2, 0.14, 0.15, 0.15.1.post1)
ERROR: No matching distribution found for docutils==0.15.1

pip seems to identify that there is no 0.15.1 version.

In order to hotfix this issue, I am doing the following in my pyproject.toml in case anyone is running into similar issues:

[tool.poetry.dev-dependencies]
###
docutils = "<0.15.1"  # hot fix: https://github.com/sdispater/poetry/issues/1194
###

Just to add some clarity, I tried poetry lock on both the latest pre-release (1.0.0a5) and the last stable version (0.12.17) and was still running into the issue with the system misidentifying the latest version of docutils.

for me updating torchvision to 0.3 did the trick for whatever reason...

@magnusja That's likely because they updated the package and 0.3 is the latest version and post version was no longer the latest one.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Euphorbium picture Euphorbium  Â·  3Comments

thmo picture thmo  Â·  3Comments

EdgyEdgemond picture EdgyEdgemond  Â·  3Comments

ulope picture ulope  Â·  3Comments

nikaro picture nikaro  Â·  3Comments