Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197198
| Path | csiph.com!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> (permalink) |
| 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> |
| Xref | csiph.com comp.lang.python:197198 |
Show key headers only | View raw
[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