Deutsch English Français Italiano |
<mailman.86.1737156639.2912.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: "Peter J. Holzer" <hjp-python@hjp.at> Newsgroups: comp.lang.python Subject: Re: Strategies for avoiding having to use --break-system-packages with pip Date: Sat, 18 Jan 2025 00:22:08 +0100 Lines: 59 Message-ID: <mailman.86.1737156639.2912.python-list@python.org> References: <jjuh5l-g7rv.ln1@q957.zbmc.eu> <20250117232208.kbitploxjkktzpwo@hjp.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rv6hssab3bxwuxfd" X-Trace: news.uni-berlin.de KQCk5iZsIEwmvtUl4EyHbwaXkQHNRQApXcLsOxW93/Mg== Cancel-Lock: sha1:3lLvYyAuwYvkg9eLy25+w6K2T7U= sha256:WqsHnc+pZY+MZtHqxf5BzWCTBKlDdHfOBSKvK0CN0+E= Return-Path: <hjp-python@hjp.at> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'content- type:multipart/signed': 0.05; 'content-type:application/pgp- signature': 0.09; 'environment,': 0.09; 'filename:fname piece:asc': 0.09; 'filename:fname piece:signature': 0.09; 'filename:fname:signature.asc': 0.09; 'skip:# 30': 0.09; 'subject:packages': 0.09; 'url:master': 0.09; '"creative': 0.16; '__/': 0.16; 'challenge!"': 0.16; 'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer': 0.16; 'interpreter': 0.16; 'reality.': 0.16; 'script,': 0.16; 'stross,': 0.16; 'subject:pip': 0.16; 'url-ip:212.17.106.129/32': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16; 'url:branch': 0.16; 'url:hjp': 0.16; 'wrapper': 0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'python': 0.16; 'probably': 0.17; 'uses': 0.19; 'to:addr:python-list': 0.20; 'i.e.': 0.22; 'command': 0.23; 'run': 0.23; 'chris': 0.28; 'sense': 0.28; 'example,': 0.28; 'program': 0.32; 'python-list': 0.32; 'but': 0.32; 'subject:for': 0.32; 'there': 0.33; 'header:In- Reply-To:1': 0.34; 'able': 0.34; "skip:' 10": 0.37; 'using': 0.37; "it's": 0.37; 'use': 0.39; 'edit': 0.39; 'setting': 0.39; 'prompt': 0.39; 'program.': 0.40; 'want': 0.40; 'simply': 0.63; 'received:userid': 0.66; '[1]': 0.67; 'assist': 0.70; 'virtual': 0.71; 'url-ip:lookup error': 0.72; '(that': 0.84; 'itself.': 0.84; 'received:at': 0.84; 'subject: \n ': 0.84; 'subject:Strategies': 0.84; 'url:src': 0.84; 'activate': 0.91; 'green': 0.96 Mail-Followup-To: python-list@python.org Content-Disposition: inline In-Reply-To: <jjuh5l-g7rv.ln1@q957.zbmc.eu> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <20250117232208.kbitploxjkktzpwo@hjp.at> X-Mailman-Original-References: <jjuh5l-g7rv.ln1@q957.zbmc.eu> Bytes: 5682 --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--