Re: Pip installs to unexpected place
"Peter J. Holzer" <[email protected]>
| Newsgroups | comp.lang.python |
|---|---|
| Message-ID | <[email protected]> |
On 2025-04-18 17:11:33 +0100, Oscar Benjamin via Python-list wrote: > On Fri, 18 Apr 2025 at 16:50, Peter J. Holzer via Python-list > <[email protected]> wrote: > > > > On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: > > > On 18/04/25 9:41 am, Mats Wichmann wrote: > > > > There's just not a really great answer to this. > > > > > > Seems to me a system-installed application shouldn't be looking in the > > > user's .local packages in the first place. That should only be for things > > > the user has installed "for this user". > > > > It's not the application that looks into .local, it's Python. If you say > > that a system-installed Python shouldn't look into ~/.local, then you've > > just disabled that mechanism completely. If not then Python would > > somehow have to distinguish between system-installed and user-installed > > scripts. This isn't as easy as checking whether the path starts with > > /usr/bin or whether it belongs to root. Tying into the system's package > > manager doesn't look appealing to me (not to mention that it might be > > unacceptably slow). > > Couldn't the system-installed scripts have a shebang like: > > #!/usr/bin/python3 -s Yes, that should work. At least I can't think of any downsides at the moment. hjp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | [email protected] | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmgDYREACgkQ8g5IURL+ KF0z/xAAgIhbMqE4Ompkwiexp2e7jrFbcKcAoWUehTQc8QQpfynNxK1AGQ66XWXc 5bIjOOCZbp4XYpLfpIfd+cPlGYmaANTnRcBdWLNwrjF//uYx6HuvtBOqKZKGGq1e 5aQbh0+3gq4Ade4JKCQXWh1YQ8vF0ux66vSbRKNa7PAe9hKcrKaBe0pMrmstNfk8 caUE1oWdxvGvgx0waH1NOwhaJiiwhItTAAvo9xxcbgzBhbIizogwuYAzCJ+xkiP+ R4IPcwLz0lReTJSSnXprUDrh17mi4wv3aNXbdpxLB82Efm7ZxQd14/lBC4kSqlYL yS5NOujbj8Po/y+nzi9XGQHJVn4P9Naom8zAcqBalbInj4qu1Xtvw0MEMrLvvQL2 eoS26KYCXbDR+0jxV/kGhPqn2TTr/HbYvQoFxPZiH/tfd8v0xXQQarZ1Cd/Jm+Ho YPMvCR403/uSvb1ilvgBujlQNTaVkadI0aUkWBNlg3F4evRdstF2IcsA2Lnbu3Ns pXjsGKBQDCq02v4DLNIr0uge7Ia9NcnyAhYdRvEMv6pjcy5RsyepR3UAcfiNnjR/ KW1ysFKe1CDkDFxnAb6Ei6202ADA+DtQZIx9Qre3RBFMR7Vuh0SjlyYtYQMvuHDl Zzooid9mr4EPpjYuGTq9kxS8I+wMTPLrjwI+xcR+3OsbhZe4BjM= =CIdO -----END PGP SIGNATURE-----