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
-
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 temp
poetry init
(accepting all defaults)poetry add pyyaml
poetry run python
sometimes hangspoetry shell
,poetry install
andpoetry 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 temp
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py
python get-poetry.py --uninstall
rm get-poetry.py
cd .. && rmdir temp
Delete the
pypoetry
folder inC:\Users\your_windows_user\AppData\Local
From now on, use only Git Bash, and without the
-i
option.bash.exe
with the-i
option)C:\Program Files\Git\bash.exe
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
Install poetry:
C:\Program Files\Git\bash.exe
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
It should work now when you use Git Bash (directly or from within VSCode)
Beta Was this translation helpful? Give feedback.
All reactions