-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/docsDocumentation issues/improvementsDocumentation issues/improvements
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
Hello! I and a colleague spent a lot of time debugging why poetry wasn't working properly in our Windows. Some examples of weird outputs that we were getting:
- The following sequence sometimes gives "No dependencies to install or update":
mkdir temp && cd temppoetry init(accepting all defaults)poetry add pyyaml
poetry run pythonsometimes hangspoetry shell,poetry installandpoetry add pyyaml(or any package) almost always gave a warning that the "environment seems to be broken"
We finally worked out a solution, I think it would be worth having a section on the documentation describing this. I've written the steps below.
How to fix glitchy poetry on Windows
-
Just in case, close PyCharm if you have it running (not sure if this was really necessary)
-
Uninstall poetry:
mkdir temp && cd tempcurl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.pypython get-poetry.py --uninstallrm get-poetry.pycd .. && rmdir temp
-
Delete the
pypoetryfolder inC:\Users\your_windows_user\AppData\Local -
From now on, use only Git Bash, and without the
-ioption.- DON'T use Windows cmd
- DON'T use "Open Git Bash Here" from the Windows context menu (since it starts
bash.exewith the-ioption) - DO use
C:\Program Files\Git\bash.exe - DO use Git Bash from VSCode, which works too:
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
-
Install poetry:
- Open
C:\Program Files\Git\bash.exe curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python- Close the terminal
- Open
It should work now when you use Git Bash (directly or from within VSCode)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/docsDocumentation issues/improvementsDocumentation issues/improvements