Subject: Re: Strategies for avoiding having to use --break-system-packages
with pip
--rv6hssab3bxwuxfd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 2025-01-14 11:32:35 +0000, Chris Green via Python-list wrote:
Use a virtual environment, what do I have to do then to make using
my program (that uses tkintertable) 'transparent', i.e. I just
want to be able to run the program from the command prompt like
any other program.
Just use the python interpreter in the venv in the hashbang line.
For example, here's the first line of one my scripts:
#!/usr/local/share/wds/venv/bin/python3
As you can probably guess, the venv is in /usr/local/share/wds/venv.
There is no need for wrapper scripts which activate the venv. Python
does that all by itself.
I have a small script, install-python[1], to assist with setting the
hashbang, but if it's just a few scripts you can simply edit it manually.
hp
[1]
https://git.hjp.at:3000/hjp/install-python/src/branch/master/install-py= thon
--=20
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | |
hjp@hjp.at | -- Charles Stross, "Creative writing
__/ |
http://www.hjp.at/ | challenge!"
--rv6hssab3bxwuxfd
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmeK5hsACgkQ8g5IURL+ KF1avxAAsqo7v6IOH0VKMUnf+pLeoyzhlX6//Ky1WDE0MDPr5z+A1WOBRf888bOv kXkSFvG5TwxVFSsUjcVimuOyDs7h3tcK5N9ZSWWiDTR3GYnVAI7Fu4noRYQOPiPA MSeFAxDshv/86d9ZNtUL6U7LaDZotuOsNesg3UaT+LtNpmsMvyrhquZrSJp+5IJj zIFOyrm+y+hFhEHU3/N84LCn0KbsZQOVVwSSnFi8fC/7mqZlG4pmNnKGujIjUsO/ eMQ9M+zQZotk7R1xctIRAA+kPtxC0zj+LHp4yYwhWNgWt9geOwnigiuE1Bcqn/Gf pp65wbu9xx2rxS7FFlsGkcGv5awBe2HwXwkCBt1cAeSJ78fqMkH2QSvcPyXdJ9aY A+mlQ0erXl6tlG+hpbjOvhkc4Vyvfro66wCJGGI8VZ7xXEdSMtk3t87vc8PdCUMU ZdUx30bEwEOAToGSR4IgCu8QRBzHMra2ApzcE464ZEbz6Qgm/fzNOXR/49MuC1aT 1mR/5fvKq6ExVNE3WHyLMV1KUNVfaDWkLeyzfYolPFnzZZ1mPXKezTOTzJsMb+Cm s3QkTbgW90Dhc6v37hLa3sC6n3iIX4w0q49r+0kZ/Qg/bhML34+I76Q9QFgL051b w5DEwmt34rLfdb723Q7z5/3wwv7h6PVffNnkKI/zHbn5U2/VJrQ=
=8GQl
-----END PGP SIGNATURE-----
--rv6hssab3bxwuxfd--
--- MBSE BBS v1.0.8.4 (Linux-x86_64)
* Origin: ---:- FTN<->UseNet Gate -:--- (3:633/280.2@fidonet)