poetry self update not updating poetry (new version available) properly. poetry --version showing old version
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.
-
Poetry version: 1.1.9
Issue
When poetry self update is ran, it doesn’t update poetry properly. It is showing old version for command poetry --version
instead of showing new version
Minimal steps to reproduce
- Run new docker python image
docker run -it python bash
- Install poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
export PATH="/root/.local/bin:$PATH"
poetry --version
Poetry version 1.1.9- Run self update to preview
poetry self update --preview
- Rerun
poetry --version
It showsPoetry version 1.1.9
instead of preview version
This issue is also present when updating poetry from 1.1.8 to 1.1.9. Other version not tested
Full steps
$ docker run -it python bash
root@aeac3f8b58ef:/# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
Retrieving Poetry metadata
# Welcome to Poetry!
This will download and install the latest version of Poetry,
a dependency and package manager for Python.
It will add the `poetry` command to Poetry's bin directory, located at:
/root/.local/bin
You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.
Installing Poetry (1.1.9): Done
Poetry (1.1.9) is installed now. Great!
To get started you need Poetry's bin directory (/root/.local/bin) in your `PATH`
environment variable.
Add `export PATH="/root/.local/bin:$PATH"` to your shell configuration file.
Alternatively, you can call Poetry explicitly with `/root/.local/bin/poetry`.
You can test that everything is set up by executing:
`poetry --version`
root@aeac3f8b58ef:/# export PATH="/root/.local/bin:$PATH"
root@aeac3f8b58ef:/# poetry --version
Poetry version 1.1.9
root@aeac3f8b58ef:/# poetry self update --preview
Updating Poetry to 1.2.0a2
Updating dependencies
Resolving dependencies... (3.5s)
Package operations: 36 installs, 0 updates, 0 removals
- Installing certifi (2021.5.30)
- Installing charset-normalizer (2.0.6)
- Installing cryptography (3.4.8)
- Installing idna (3.2)
- Installing jeepney (0.7.1)
- Installing urllib3 (1.26.6)
- Installing zipp (3.5.0)
- Installing appdirs (1.4.4)
- Installing crashtest (0.3.1)
- Installing distlib (0.3.2)
- Installing filelock (3.0.12)
- Installing importlib-metadata (4.8.1)
- Installing lockfile (0.12.2)
- Installing msgpack (1.0.2)
- Installing ptyprocess (0.7.0)
- Installing pylev (1.4.0)
- Installing pyparsing (2.4.7)
- Installing requests (2.26.0)
- Installing secretstorage (3.3.1)
- Installing six (1.16.0)
- Installing webencodings (0.5.1)
- Installing cachecontrol (0.12.6)
- Installing cachy (0.3.0)
- Installing cleo (1.0.0a4)
- Installing entrypoints (0.3)
- Installing html5lib (1.1)
- Installing keyring (23.2.1)
- Installing packaging (20.9)
- Installing pexpect (4.8.0)
- Installing pkginfo (1.7.1)
- Installing poetry-core (1.1.0a6)
- Installing requests-toolbelt (0.9.1)
- Installing shellingham (1.4.0)
- Installing tomlkit (0.7.2)
- Installing virtualenv (20.4.4)
- Installing poetry (1.2.0a2)
Updating the poetry script
Poetry (1.2.0a2) is installed now. Great!
root@aeac3f8b58ef:/# poetry --version
Poetry version 1.1.9
root@aeac3f8b58ef:/#
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Introduction | Documentation | Poetry - Python dependency ...
Introduction Poetry is a tool for dependency management and packaging in Python. ... a specific version, you can pass it as an argument...
Read more >poetry - PyPI
Documentation for the current version of Poetry (as well as the development branch and recently out of support versions) is available from the...
Read more >pyenv: poetry itself, running on older python version, what to do?
By default Poetry will use the Python version used during it installation to create a new venv. Set the (experimental) config option ...
Read more >Update Packages in Python Poetry - YippeeCode
Well, Poetry is smart enough to detect if the package already exists in your system. It does not mean that it will keep...
Read more >Announcing Poetry 1.2.0 -- Python dependency management ...
Now, they aren't allowing users to install the new poetry versions with the old installer and people using the old installer will get...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It happened again after running
poetry self update
from Poetry 1.1.9. It says it updated Poetry to 1.1.10, butpoetry --version
returns 1.0.9.Running the install script again fixes the issue, installing Poetry 1.1.10.
On 1.1.9,
poetry self update
also throws a RuntimeError “Poetry was not installed with the recommended installer. Cannot update automatically.” even though I have used the recommended installer. Just to be sure, I uninstalled poetry and then reinstalled with the new installer, and I’m still getting the error.Here’s the full traceback: