poetry: `Latest version already installed` but `poetry: command not found`
-
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). -
OS version and name: Windows 10
-
Poetry version: 1.1.13
-
Link of a Gist with the contents of your pyproject.toml file: gist
Issue
Based on SO post.
Goal: Finally get Poetry working in Git Bash !
I’ve literally tried everything you can think of.
- Completely wiped my PC,
- Tried Anaconda and Miniconda versions (installing and uninstalling),
- Setup Conda with Git Bash,
- Experimented with WSL 2 and PowerShell,
- Advanced System Settings - PATH vars,
- Installed and uninstalled Poetry (curl, conda, pip),
Yet, I cannot for the life of me get Poetry working.
Latest
Miniconda3:
HDS+dabell@PF2DCSXD MINGW64 /
$ conda info
active environment : None
shell level : 0
user config file : C:\Users\dabell\.condarc
populated config files :
conda version : 4.12.0
conda-build version : not installed
python version : 3.9.12.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\dabell\Miniconda3 (writable)
conda av data dir : C:\Users\dabell\Miniconda3\etc\conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\dabell\Miniconda3\pkgs
C:\Users\dabell\.conda\pkgs
C:\Users\dabell\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\dabell\Miniconda3\envs
C:\Users\dabell\.conda\envs
C:\Users\dabell\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.12 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
Poetry:
HDS+dabell@PF2DCSXD MINGW64 /
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
Retrieving Poetry metadata
This installer is deprecated. Poetry versions installed using this script will not be able to use 'self update' command to upgrade to 1.2.0a1 or later.
Latest version already installed.
HDS+dabell@PF2DCSXD MINGW64 /
$ export PATH="$HOME/.poetry/bin:$PATH"
HDS+dabell@PF2DCSXD MINGW64 /
$ poetry self update
bash: poetry: command not found
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (9 by maintainers)
Clean up whatever mess you have gotten yourself into, and start over, using the new installer.
You are going to have to figure out for yourself what “whatever mess you have gotten yourself into” means.
There will be clues in the errors that you are seeing: for instance you could read the
get-poetry.py
script to learn why it thinks that poetry is already installed - it must be finding some file or directory somewhere, and you should remove that.Again, best of luck: but please stop raising issues against the old installer, and no more @'s please.
In case this helps anyone: I had a similar error to OP (trying to use new installer, it claimed latest was already installed and exited, but then
poetry
returned command not found). I had installed poetry > a year ago and hadn’t used it since, and could not figure out how to fully uninstall it today. (I first tried seeing if there was a command to uninstall it directly, which there is not, so then I tried removing the poetry directory in my user folder, which had no effect.)Eventually I found the
~/Library/Application Support/pypoetry
folder and removed it manually, then the installer started working.FWIW, the problem for me was that ~/./.local/share/pypoetry existed after restoring from backup. Even though ~/.local/bin/poetry had been removed, the new script refused to reinstall.