-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry install .venv from pyenv-win make problem for pywin32 install #8612
Comments
poetry is responsible for unpacking the pywin32 wheel into the virtual environment where you are installing that wheel. Nothing more. what happens when you run your code is between you and I see no poetry bug. |
eh, let me use another way to explain~ Now, let's just forget pywin32, only compare poetry created .venv from pyenv-win and miniconda created .venv. If i use miniconda create the .env by using
and if I check the site for this .venv by using
And poetry installed .venv from pyenv-win, the folder structure is like below(partially):
So maybe it is not poetry's issue, it is only my finding the folder structure and python sites output is the key to make pywin32 running successfully. With the conda created .venv, the pywin32 install command will do right copy:
Thanks for any clue~ |
poetry just uses virtualenv to create environments, I expect you can reproduce the same without poetry by calling virtualenv directly: and if you think there's a problem with those environments then you should talk to the virtualenv project |
Ok I will. thanks any way~ |
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. |
My idea is to use pywin32 create windows service, but meet problem with poetry install.
Background Environment:
pyenv installed the python 3.12.0
poetry config --list
Steps:
.\.venv\Scripts\python.exe -m site
poetry run python ./src/python_windows_service.py install
in the evaluated powershell:Now, if I run
python ./src/python_windows_service.py debug
will show nothing, and if I go to windows service dialog and start the service manually, it will throw error 1053.Then, I use miniconda to create the new .env, and do above steps again, and find everything is good.
I find the difference between
poetry install
and miniconda way..venv
is different:./venv/python.exe
Vs./venv/Scripts/python.exe
pywintypes312.dll
is copied into the pyenv-win python location. But in miniconda way, this file will be copied into.venv/
folder, just alongside the./venv/python.exe
.Expectations
poetry install can copy all of files from pyenv installed version, and not link to the location of pyenv folders, so that, pywin32 will work
The text was updated successfully, but these errors were encountered: