[python-win32] Using relative python path in exe files generated by `ScriptMaker`
Ilya Kazakevich
ilya.kazakevich at jetbrains.com
Mon Dec 9 19:03:33 EST 2024
Hello,
I create an environment on one Windows machine and then move it to another one.
Once I call `pip install` it creates `.exe` files for tools i.e
`poetry.exe`, `django-admin.exe` e.t.c.
This is done by a class called `ScriptMaker` as I see.
The problem is it sets a full path (`sys.executable`) so I can't move
it to another machine or directory.
To fix it I can use relative path
```
ScriptMaker.executable = "../python.exe"
```
for example, but how can I "patch" the pip?
I can put this code into `sitecustomize.py` but it looks like a hack.
Any suggestions on how to fix it in a proper way?
Thank you in advance,
Ilya.
More information about the python-win32
mailing list