Troubleshooting Windows usage #4347
papb
started this conversation in
Show and tell
Replies: 1 comment
-
|
Are these instructions still useful with the new installer, And why is it that Git bash should not be executed in interactive mode (the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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:
mkdir temp && cd temppoetry init(accepting all defaults)poetry add pyyamlpoetry 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 tempDelete the
pypoetryfolder inC:\Users\your_windows_user\AppData\LocalFrom now on, use only Git Bash, and without the
-ioption.bash.exewith the-ioption)C:\Program Files\Git\bash.exe"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"Install poetry:
C:\Program Files\Git\bash.execurl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | pythonIt should work now when you use Git Bash (directly or from within VSCode)
Beta Was this translation helpful? Give feedback.
All reactions