Think of python as a system of jails, whose location is determined by the version of python that invokes the install. If you use /usr/bin/python, then your jail is something like /usr/lib/python3.10/dist-packages. If your version of python is invoked from pyenv, then it's ~/.pyenv/versions/3.10.5/lib/python3.10/site-packages. If you use the --user flag, then your jail is slightly different: ~/.local/lib/python3.10/site-packages, but you get visiting rights to the pyenv packages. If you install with pipenv, then your jail will be located at something like ~/.local/share/virtualenvs/tkeffer-g5o4x4y2/bin/distro. For virtual environments created using venv, you get to specify the location of the jail.
The point being that each instance of the python interpreter comes with a well-defined "jail" and you're not allowed to roam around free into the other jails, nor the rest of the file system. It's kind of like sandboxes in web browsers. You're stuck in your own sandbox. Only one of them, the first example, requires root. On Tue, Nov 8, 2022 at 12:09 PM Vince Skahan <[email protected]> wrote: > On Tuesday, November 8, 2022 at 11:39:33 AM UTC-8 Tom Keffer wrote: > >> Vince: pip can install to many places. Yes, it can install to the >> system's dist-packages, although I don't think that's a great idea. It >> requires sudo and can break existing applications. Better idea is to use >> "--user" and install to ~/.local, or install to a virtual environment, or >> use pipenv. >> >> The new tool would then install to either /home/weewx or ~/.weewx, or >> something similar. >> > > Again, totally lost. First we 'may not' install outside system > locations. Now we will do just that. > I'm going to stop reading I think at this point. > > Build something and I'm sure lots of people will try it out...please pick > 'one' way to do it, whatever that way is. > > > -- > You received this message because you are subscribed to the Google Groups > "weewx-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-development/01d0f44f-8d69-4799-a55a-69f6822ad046n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-development/01d0f44f-8d69-4799-a55a-69f6822ad046n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEAkdOx0bFesvkbECuDstuu1cKyxKs7L3WH2XrqLCX-3Rg%40mail.gmail.com.
