I have a pyproject.toml
file that was created using poetry, and I'm trying to run the command poetry install
in this directory to create a poetry.lock
file. However, when I run poetry install, I get the following error:
EnvCommandError
Command C:\Users\myName\AppData\Local\pypoetry\Cache\virtualenvs\my-app-name-kS94etse-py3.8\Scripts\python.exe -
errored with the following return code 3, and output:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "c:\users\myName\anaconda3\lib\io.py", line 52, in <module>
File "c:\users\myName\anaconda3\lib\abc.py", line 106
print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
^
SyntaxError: invalid syntax
input was : import sys
This error seems pretty in depth but I dont understand why poetry thinks import sys
is invalid syntax or even where that's being called to create an issue. Any suggestions on how to fix this?
Resolved here: https://stackoverflow.com/a/67169273/12060361
pyproject.toml
file to use): https://www.python.org/downloads/release/python-385/C:\Users\myName\AppData\Local\pypoetry\Cache\virtualenvs\my-app-name-kS94etse-py3.8\Scripts\python.exe
python.exe
currently in that folder with the new one you just downloaded