Re: Strategies for avoiding having to use --break-system-packages with pip

Liste des GroupesRevenir à cl python 
Sujet : Re: Strategies for avoiding having to use --break-system-packages with pip
De : cl (at) *nospam* isbd.net (Chris Green)
Groupes : comp.lang.python
Date : 18. Jan 2025, 12:47:57
Autres entêtes
Message-ID : <d0hs5l-pmm1.ln1@q957.zbmc.eu>
References : 1 2 3
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-29-amd64 (x86_64))
Peter J. Holzer <hjp-python@hjp.at> wrote:
[-- text/plain, encoding quoted-printable, charset: us-ascii, 32 lines --]
 
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.
 
OP here.  Yes, thank you, I thought that the shebang line would do the
trick but it's nioce to have it confirmed.

--
Chris Green
·

Date Sujet#  Auteur
14 Jan 25 * Strategies for avoiding having to use --break-system-packages with pip8Chris Green
14 Jan 25 +- Re: Strategies for avoiding having to use --break-system-packages with pip1Stefan Ram
14 Jan 25 +- Re: Strategies for avoiding having to use --break-system-packages with pip1Mats Wichmann
14 Jan 25 +- Re: Strategies for avoiding having to use --break-system-packages with pip1c.buhtz
14 Jan 25 +- Re: Strategies for avoiding having to use --break-system-packages with pip1Thomas Passin
14 Jan 25 +- Re: Strategies for avoiding having to use --break-system-packages with pip1Left Right
18 Jan 25 `* Re: Strategies for avoiding having to use --break-system-packages with pip2Peter J. Holzer
18 Jan 25  `- Re: Strategies for avoiding having to use --break-system-packages with pip1Chris Green

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal