Closed timthedevguy closed 2 years ago
The issue looks like it's that specific virtual environment. I'd try re-creating it.
I have recreated it in multiple places, different folders, different parent folders, I can run the 'Steps to Reproduce' anywhere and have it happen.
You can see a video of the error happening here, brand new folder on Desktop that has never been used before...I create it in the video. Poetry Error
Does the same issue happen if you activate the environment via C:\Users\tim.davis\AppData\Local\pypoetry\Cache\virtualenvs\allianceauth-dev-Yhucgjl3-py3.7\Scripts/activate.bat
oppposed to poetry shell
?
That said, I have a sneaky suspicion the issue the vendored version of virtualenv
in your system (https://github.com/pypa/virtualenv/pull/2246). I'd recommend that you try uninstalling your current install (using the old installer) and installing via the new installer or pipx.
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --uninstall
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
You can see the new installation doc at https://python-poetry.org/docs/master/.
If I use the activate.bat then it works successfully.
And the uninstall and reinstall did the trick....I was using the docs located at https://python-poetry.org/docs/, my apologies and much thanks for the quick assistance!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
[x ] I am on the latest Poetry version.
[x ] I have searched the issues of this repo and believe that this is not a duplicate.
[x ] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Windows 10 Pro 21H1
Poetry version: 1.1.13
Link of a Gist with the contents of your pyproject.toml file: pyproject.toml
Issue
I have been able to reproduce this repeatedly. (Steps at bottom)
My environment:
For this project I needed to use Python 3.7, so I specified '^3.7' for Python version and then used
poetry env use C:\Python37\python.exe
which creates the env successfully.Running any poetry command (even poetry by itself) results in the following output but ONLY when I'm in the activated env. Outside of the env Poetry is fine.
To Reproduce
poetry init
and provide Python version of '^3.7' when prompted, I do not define dependencies interactivelypoetry env use C:\Python37\python.exe
poetry shell
poetry
which should print out help, instead I get the errorI can run this procedure on a Python 3.8 project and not have the error so I'm guessing something to do with 3.7...but I could be wrong.
Thanks for reading!