poetry: self:update failed. Win10, Python 3.7.2 Dead 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).
  • OS version and name:
  • Poetry version:
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

Went to self:update from 0.12.11 to 1.0.0.a2 preview and got this.

c:\Python\WinPy\python-3.7.2.amd64>poetry show --version Traceback (most recent call last): File “C:\Users\ST33L.poetry\bin\poetry”, line 11, in <module> from poetry.console import main ModuleNotFoundError: No module named ‘poetry.console’

c:\Python\WinPy\python-3.7.2.amd64>poetry self:update --preview Traceback (most recent call last): File “C:\Users\ST33L.poetry\bin\poetry”, line 11, in <module> from poetry.console import main ModuleNotFoundError: No module named ‘poetry.console’

c:\Python\WinPy\python-3.7.2.amd64>curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | py Retrieving Poetry metadata

Latest version already installed.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 13
  • Comments: 27 (4 by maintainers)

Most upvoted comments

Here ya go:

`C:\Python\poetry>poetry self:update --preview -vvv Updating to 1.0.0a2

[PermissionError] [WinError 5] Access is denied: ‘C:\Users\ST33L\.poetry\lib\poetry\_vendor\py3.7\msgpack\_cmsgpack.cp37-win_amd64.pyd’

Exception trace: C:\Users\ST33L.poetry\lib\poetry_vendor\py3.7\cleo\application.py in run() at line 94

C:\Users\ST33L.poetry\lib\poetry\console\application.py in do_run() at line 88

C:\Users\ST33L.poetry\lib\poetry_vendor\py3.7\cleo\application.py in do_run() at line 197

C:\Users\ST33L.poetry\lib\poetry\console\commands\command.py in run() at line 77

C:\Users\ST33L.poetry\lib\poetry_vendor\py3.7\cleo\commands\base_command.py in run() at line 146

C:\Users\ST33L.poetry\lib\poetry_vendor\py3.7\cleo\commands\command.py in execute() at line 107

C:\Users\ST33L.poetry\lib\poetry\console\commands\self\update.py in handle() at line 108

C:\Users\ST33L.poetry\lib\poetry\console\commands\self\update.py in update() at line 132

C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in rmtree() at line 513 return _rmtree_unsafe(path, onerror) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 392 _rmtree_unsafe(fullname, onerror) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 392 _rmtree_unsafe(fullname, onerror) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 392 _rmtree_unsafe(fullname, onerror) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 392 _rmtree_unsafe(fullname, onerror) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 397 onerror(os.unlink, fullname, sys.exc_info()) C:\Python\WinPy\python-3.7.2.amd64\lib\shutil.py in _rmtree_unsafe() at line 395 os.unlink(fullname)

self:update [–preview] [–] [<version>]`

I also have the same problem, and the best solution I found for me is to use pipx instead to manage Poetry installation on Windows, as suggested in the docs. It works like a charm, doesn’t install its dependencies globally as it would be using pip and upgrading Poetry is as easy as pipx upgrade poetry, no locking issues.

Here’s my solution, which I believe is THE EASIEST.

Just copy paste Poetry installation commend, i.e: $ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

on your os/linux/bashonwindows terminal, and wait.

Done.

I’m on: Windows 10 Pro 64bit Python 3.7.6 64bit Poetry 1.0.2 --> 1.0.4 (the latest)

I have given up on Poetry due to just experiencing this issue. Best hopes for the future of the project though but I did not find it had the reliability I would want from such a solution.

Yeah, I suspect you will have to clean out Poetry entirely (delete C:\Users\woo12\.poetry), and reinstall not as administrator, to get it working correctly, as it sounds like part of your install is in Administrator, and part is as a regular user, and something’s now conflicting.

I personally use pipx (which avoids a bunch of these issues) so I can’t say for sure that there’s not other things you’d need to delete. You virtual envs are probably stored in that directory too.

I haven’t checked, but perhaps get-poetry.py has an “uninstall” option you can run as Administrator to clear out the existing install?

I experienced this error upgrading from 1.0.3 to 1.0.5 (latest) via self upgrade. Reinstalling 1.0.5 via curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python, then running poetry self upgrade 1.0.3, produced the same error message on _cmsgpack.cp37-win_amd64.pyd.

I think I’ll try pipx instead of get-poetry.

EDIT: pipx install poetry works flawlessly, so far.

As for the rest of that… that’s not how I set up python and not about to change. It’s my belief that if you are designing an external supplement for it that you should cover all bases. I’m simply reporting the issue.

Appears so, but only with itself, the update process. Ran under Administrator cmd. Can delete folder with no locking issues.