Hi Ilya,

The main solution here is "don't do that".  You can build binary wheels and 
share them between machines, but venvs are not meant to be shared.  I just 
posted about this the other day: 
<https://mastodon.social/@glyph/113608175894598083>.

Wny are you trying to copy a venv from one machine to another?

-g

> On Dec 9, 2024, at 4:03 PM, Ilya Kazakevich via python-win32 
> <python-win32@python.org> wrote:
> 
> 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.
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> https://mail.python.org/mailman/listinfo/python-win32

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to