Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197198
| 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 | 2025-01-18 00:22 +0100 |
| Message-ID | <mailman.86.1737156639.2912.python-list@python.org> (permalink) |
| References | <jjuh5l-g7rv.ln1@q957.zbmc.eu> <20250117232208.kbitploxjkktzpwo@hjp.at> |
[Multipart message — attachments visible in raw view] - view raw
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-python
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Strategies for avoiding having to use --break-system-packages with pip Chris Green <cl@isbd.net> - 2025-01-14 11:32 +0000
Re: Strategies for avoiding having to use --break-system-packages with pip Mats Wichmann <mats@wichmann.us> - 2025-01-14 09:06 -0700
Re: Strategies for avoiding having to use --break-system-packages with pip c.buhtz@posteo.jp - 2025-01-14 16:09 +0000
Re: Strategies for avoiding having to use --break-system-packages with pip Thomas Passin <list1@tompassin.net> - 2025-01-14 11:36 -0500
Re: Strategies for avoiding having to use --break-system-packages with pip Left Right <olegsivokon@gmail.com> - 2025-01-14 20:06 +0100
Re: Strategies for avoiding having to use --break-system-packages with pip "Peter J. Holzer" <hjp-python@hjp.at> - 2025-01-18 00:22 +0100
Re: Strategies for avoiding having to use --break-system-packages with pip Chris Green <cl@isbd.net> - 2025-01-18 11:47 +0000
csiph-web