Hi On 9/8/20 9:35 PM, Roger Oberholtzer wrote:
I am trying to get tensorflow and related packages installed on openSUSE Leap 15.1 and/or Tumbleweed.
We have a package from a consulting company who have developed with tensorflow 1.14, but OBS has only 1.15. Seems this is not compatible.
I can install tensorflow via zypper or pip3. It seems they install the same version, which looks to be the version in OBS.
My question is: what is the relationship between packages built in OBS and that are also available via pip3? I looked around in the openSUSE docs and there is lots on how best to build a package on OBS (via py2pack that looks very useful!). But that is from the developer's view. What about from the package user's view? Most Python packages have a setup functionality that get the needed bits via pip. Is that effectively just getting thighs from OBS?
The difference is they both have slightly different aims and goals, the goal of the distro packages is probably most clear, the aim of the python packages in the distro is to provide a stable platform for all the python apps in the distro (and that users may also choose to use). The important thing here is that we know that each python lib works well with each other lib, python packages in the distro often get there source code from pip as a starting point but they get all there dependencies from other distro packages not pip. This also means particularly in Leap we might use a slightly older version then in pip because we know it works with everything else, it also tends to mean that we only ship one version of each package. From that the aim of the packages in obs is mostly to keep the python packages in tumbleweed up to date and working in the way I described above this also means that when we create the next major version of SLE and Leap we have a fair idea that the python stack will already work pretty well together.
The reason I used tensorflow as an example is that for many systems (Ubuntu as an example) older versions of packages seem to be available via pip. Is the reason that I do not see older versions of tensorflow for openSUSE in pip because these older versions are no longer available in OBS?
I don't think so, the content in pip is uploaded by the tensorflow developers so for some reason they have chosen to drop support for that version. Tensorflow is an interesting example because I believe it calls into a bunch of C libs and it could be that they can't build those libs or are choosing not to build those libs for older versions on openSUSE. You will really need to ask the tensorflow devs why something isn't available on pip, you may still be able to build it from source. Generally when developing a python app you have two choices if you don't care too much about the library versions you need just using the distro python libs will probably save you some headaches, (Some SUSE customers use SLE with LTSS for this because they know they will have 5 years of python libs not really changing). If you really care about certain versions then you really need to manage everything yourself by using a python virtualenv and installing everything from pip which is probably the more common way for businesses etc to do it but it then means you need to keep on top of security fixes etc. What really isn't recommended is using a mix of system and pip packages, that will probably break at some point. Cheers -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B