Above my paygrade here, don't know what the issues are with pipx that makes
it really complicated to use with extensions.
However noticed a older post
<https://groups.google.com/g/weewx-development/c/yALlGMq8Rko/m/1FsltY76BgAJ>
from
you explaining that:

"The virtual environment used by pipx (~/.local/pipx/venvs/weewx) is not
aware of the pip user area ~/.local/lib/python3.9/site-packages. Instead,
you have to install dependencies directly into the VE used by pipx"

I notice that pipx install has a --system-site-packages option that gives
the virtual environment access to the system site-packages dir. Wonder if
using that option could help with the extensions issue.

Thanks
Paul

On Mon, Jun 5, 2023 at 5:48 PM Tom Keffer <[email protected]> wrote:

> Thanks, Paul. These are changes I wasn't aware of. We've recently decided
> to delay releasing V5 until late July, so that should give us time to catch
> up with these changes.
>
> V5 pushes the idea of doing pip installs to the user space, but it looks
> like PEP 668 considers that to be externally managed as well.
>
> Alternatively, we can push to installing in a virtual environment, which
> is always a good idea, but a lot more complicated for a newbie, especially
> the part about activating the environment.
>
> There's also pipx, but using it with extensions is *really* complicated!
>
> I sure wish Python had a tool as elegant as npm.
>
> Things to think about... All input welcome.
>
> -tk
>
> On Mon, Jun 5, 2023 at 7:53 AM Paul R Anderson <[email protected]> wrote:
>
>> Debian 12, and possible other OS future releases follow PEP 668
>> <https://peps.python.org/pep-0668/>
>> This causes  refusal  to manually install packages with python
>> interpreters, unless the --break-system-packages option is specified.
>>
>> The Debian provided python3 interpreter packages (python3.11 and pypy3)
>> are now marked as being externally-managed, following PEP-668. The version
>> of python3-pip provided in Debian follows this, and will refuse to manually
>> install packages on Debian's python interpreters, unless the
>> --break-system-packages option is specified.
>>
>> python3 -m pip install weewx --user
>> Results in
>>
>> -----------------------------------------------------
>> "error: externally-managed-environment
>>
>> × This environment is externally managed
>> ╰─> To install Python packages system-wide, try apt install
>>     python3-xyz, where xyz is the package you are trying to
>>     install.
>>
>>     If you wish to install a non-Debian-packaged Python package,
>>     create a virtual environment using python3 -m venv path/to/venv.
>>     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
>>     sure you have python3-full installed.
>>
>>     If you wish to install a non-Debian packaged Python application,
>>     it may be easiest to use pipx install xyz, which will manage a
>>     virtual environment for you. Make sure you have pipx installed.
>>
>>     See /usr/share/doc/python3.11/README.venv for more information.
>>
>> note: If you believe this is a mistake, please contact your Python
>> installation or OS distribution provider. You can override this, at the
>> risk of breaking your Python installation or OS, by passing
>> --break-system-packages."
>> ---------------------------------------------
>>
>>
>> So to install with pip you need to do:
>> python3 -m pip install weewx --user --break-system-packages
>>
>> And to upgrade:
>> python3 -m pip install weewx --upgrade --user --break-system-packages
>>
>> Thanks,
>> Paul
>>
>>
>> On Sat, Jun 3, 2023 at 2:45 PM Tom Keffer <[email protected]> wrote:
>>
>>> In anticipation of the upcoming release, V5 docs can now be found at
>>> https://weewx.com/docs/5.0
>>>
>>>
>>> On Tue, May 2, 2023 at 7:56 PM Vince Skahan <[email protected]>
>>> wrote:
>>>
>>>> Just updated a28 to a29 (no issues on debian) and noticed the upgrade
>>>> document is out of date for pip upgrades.  The command for updating skins
>>>> is different now it seems.....can you push the current docs when you get a
>>>> chance please ?
>>>>
>>>> https://www.weewx.com/v5-docs/
>>>>
>>>> --
>>>> 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/e8237568-ff9d-4e50-88dc-8b9805e867b2n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/weewx-development/e8237568-ff9d-4e50-88dc-8b9805e867b2n%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/CAPq0zEDgbPZBZ6CY8fgdfRTXMFjR-90PhGpShCUzCQ3iZCB%3DsA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/weewx-development/CAPq0zEDgbPZBZ6CY8fgdfRTXMFjR-90PhGpShCUzCQ3iZCB%3DsA%40mail.gmail.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/CAOAVAeewSKymYGaRcScSDpj53g%3D3MDE0MrpdOtrMo_9FqiBz9w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/weewx-development/CAOAVAeewSKymYGaRcScSDpj53g%3D3MDE0MrpdOtrMo_9FqiBz9w%40mail.gmail.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/CAOAVAeeuC%3DmTBdrTEHrZcLKQvsyWLqGE9q7%2BM_7u2y0hakgtBA%40mail.gmail.com.

Reply via email to