Re: Using relative python path in exe files generated by `ScriptMaker`

Glyph <[email protected]> Mon, 9 Dec 2024 23:45:52 -0800
Newsgroups gmane.comp.python.windows
Message-ID <[email protected]>
--===============5003360768900105913==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_F83F60E3-DD36-4DF3-B6B7-DBF0A5721390"


--Apple-Mail=_F83F60E3-DD36-4DF3-B6B7-DBF0A5721390
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On Dec 9, 2024, at 11:15=E2=80=AFPM, Jacob Kruger =
<[email protected]> wrote:
>=20
> Might not be relevant, if am misunderstanding something, but I =
generally just use pip freeze > requirements.txt, shift that text file =
over to new location/machine, create new virtual environment, and run =
pip install -r requirements.txt from there to recreate environment, and, =
I do this across different operating systems as well?

If that works for you, then yeah, that's a good way to go.  The usual =
reason that this would not work would be if you have some native =
dependency with a build requirement and no binary build for your target =
platform, and some machines without C (or Rust, or FORTRAN, or whatever) =
compilers, which is particularly common on Windows.  But the right way =
to deal with that would be `pip wheel` and copying over the wheels =
directory with the requirements.txt, then pip install --no-index -f =
wheels/ --Ur requirements.txt, not copying the virtualenv.=

--Apple-Mail=_F83F60E3-DD36-4DF3-B6B7-DBF0A5721390
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><br =
id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Dec 9, 2024, at 11:15=E2=80=AFPM, Jacob Kruger =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><span style=3D"caret-color: =
rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 14px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;">Might =
not be relevant, if am misunderstanding something, but I generally just =
use pip freeze &gt; requirements.txt, shift that text file over to new =
location/machine, create new virtual environment, and run pip install -r =
requirements.txt from there to recreate environment, and, I do this =
across different operating systems as well?</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;"></div></blockquote></div><br><div>If that works for you, then =
yeah, that's a good way to go. &nbsp;The usual reason that this would =
not work would be if you have some native dependency with a build =
requirement and no binary build for your target platform, and some =
machines without C (or Rust, or FORTRAN, or whatever) compilers, which =
is particularly common on Windows. &nbsp;But the right way to deal with =
that would be `pip wheel` and copying over the wheels directory with the =
requirements.txt, then pip install --no-index -f wheels/ --Ur =
requirements.txt, not copying the virtualenv.</div></body></html>=

--Apple-Mail=_F83F60E3-DD36-4DF3-B6B7-DBF0A5721390--

--===============5003360768900105913==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32

--===============5003360768900105913==--