Hi Stefano,

Thanks for the reply and thank you for developing pyownet and making it available.  I have been using it for many years now.

I have always been confused over the use of sudo when installing packages, my approach has generally been to not use sudo and see if it all works as expected, if it doesn't then try installing with sudo.

The current system I am working on runs on a Raspberry Pi and has 2 programs, one which sets up the config for owfs alias file, log files etc and needs to by run with sudo, but only needs to be run when I have changed setup somehow, the other can run as a normal user and runs permanently.

I have read through you explanation of installing in a virtual environment and I have a few practical concerns.  First I am not sure my Linux and/or python skills are up to it.  Second as there will only ever be one user on this system I don't think is offers great benefits.  Third I will only be installing the one package, pyownet, with sudo, so I don't think there are any serious security risks.

Thanks for your help

Mick

On 28/10/2019 21:57, Stefano Miccoli via Owfs-developers wrote:
There is little bit of confusion.

The official OWFS bindings are

- OW.py, based on SWIG wrapping the C API of libow
- ownet.py, pure python owserver client

you will find both in debian packages

- python-ow, https://packages.debian.org/buster/python-ow
- python-ownet, https://packages.debian.org/buster/python-ownet

My advice is to avoid the use of these packages with python3 (although python3 versions exist in debian) since they are not actively developed.

I’m the author of pyownet, a different package, which does not belong to the official OWFS code base. It is documented at <https://pyownet.readthedocs.io/en/latest/> and is available only on pypi.org <http://pypi.org> since, to my knowledge, it is not packaged by any major linux distribution.

pyownet is actively mantained, and is perfectly compatible with both python3 (up from 3.3) and legacy python2 (2.7 only).

So if you “import pyownet” in your code you have to “pip install pyownet”. The discussion in this thread is whether it is a good practice to “sudo pip install pyownet” along the python packages distributed by debian. In my opinion you should avoid this, and instead use a virtual environment, as I tried to explain in my messages.

Bye

Stefano


On 28 Oct 2019, at 00:34, Mick Sulley <m...@sulley.info <mailto:m...@sulley.info>> wrote:

But that webpage says -

To install pyownet:

$ pip install pyownet



On 27/10/2019 17:09, Martin Patzak wrote:
No, pyownet is not part of ownet.

Type "man ownet"

pyownet has to be installed through pypi

maybe you find more info here:
https://github.com/miccoli/pyownet


On 27.10.19 14:54, Mick Sulley wrote:
I am confused.  pyownet seems to be working with Python3 for me if I install it as

sudo pip3 install pyownet

that is unless there are some features of it that I have not used.  Is pyownet included within python3-ownet, or have i misunderstood that?

Also on the pypi site https://pypi.org/project/pyownet/ it says that Python3 is fully supported and to install it use  'pip install pyownet'

I have looked for asyncowfs and cannot find it anywhere.  Can you point me to a web page please?

Thanks

Mick

On 27/10/2019 10:26, Matthias Urlichs via Owfs-developers wrote:
Hi,
Debian: "sudo apt install python3-ownet" (or the GUI equivalent).
Having just done that …

(a) the module is named "ownet" not "pyownet"

(b) This module doesn't work with python3. Like, at all. I have created https://github.com/owfs/owfs/pull/44 to (barely) fix that, and I sent a
bug report to Debian which should eventually show up on
https://bugs.debian.org/cgi-bin/pkgreport.cgi?package=python3-ownet .

Personally I use asyncowfs …



_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net <mailto:Owfs-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/owfs-developers



_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to