YAST - add repository

I’m very very new to opensuse (or to linux at all) and haven’t figured it out yet so assume I know nothing and please apologize if I’m asking the obvious.

This is what I want: https://github.com/iminuit/iminuit

So I opened “software repositories” in yast, chose “add” and then “specify url” and tried the posted url as well as https://github.com/iminuit/iminuit.git, however what I get is “Unable to create repository from URL …”

I have to admit I’m not sure what I’m doing and I don’t even know what exactly it is that I’m trying to install but I need it for sth else so I tried :smiley:

I would be very thankful if someone could explain to me how to install software that I can’t already find in the yast ‘library’ and which url I’m supposed to use.

The software repositories as used on openSUSE must be openSUSE software repostories. You githup URL is not such a thing.

I do not know anything about the product/package you need, but the step after you have found that what you want is not available in your current list of enabled repos (e.g. by using the YaST > Software > Software managment Search function or zypper equivalent) is using https://software.opensuse.org/search.

If it is found there, it is often possible to use a 1-clck install there, which will automatically add the repo the product is on. You might want to disable that repo after the installation to avoid conflicts with other repos and at the same time having it at hand when you want e.g. an update to that one product you installed from it.

The next step would be to find a product elsewhere. That could be on a products web site and it could be that an RPM for your version of openSUSE is availalble there. It could also be that a so called tarball with the source of the package is there. That tarball must then be downloaded, unpacked and you must build the software yourself after reading instructions an a file with the name README or similar.

The further away from a ready RPM package on an openSUSE repository you get, the more problems you may encounter in downloading, eventual building and installing the product. You may think there of other dependent library packages needed, etc.

To the OP:

Every modern Linux distro now supports a Package Management system so that Users can easily install and uninstall applications.
There are different package types, and openSUSE uses the common RPM package type, not DEB or others.
These packages are stored in a location known as a repository, so if you look in any supported repository you will find RPM files (which of course you won’t find in a github site). As an example and because you are asking about a Python app, you can open a web browser to the following location to view the special Python repository for 42.2

http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Leap_42.2/x86_64/

These repositories themselves will be of different types and must be supported by openSUSE. When a repository is set up to hold packages, typically there will be a package list and authentication keys plus other metadata for a Package Manager application to use.
On openSUSE, we have two primary Package Managmeent tools which work well together, zypper and YaST. You can also optionally use the rpm package manager as well.

Before going on further about your specific application, let’s first talk about what you can do with things at Github, after all it’s also a very important resource.
It’s what is known as a repository used generally for source code and other files, not packages which are not original code but pre-compiled to run on your system. As such, it’s a common location for people to build and test apps before they’re packaged for use. Or, it’s there for anyone to install the app without the packaging.

But, now back to the specific app you appear to want to install which is called** iminuit**.

If you search your current repositories and at https://software.opensuse.org, you won’t find the app… No one has created an RPM package for openSUSE as of today.

You can istill install the app, though…
You’ve found the github page for the application which contains the application source and directions for building from source, so that is an option although requires a bit of work.

You have another option, though.
On the application’s github page, it says it’s available from PiPi, which is the Python project’s main repository and apps installed from there will run on openSUSE just fine.

To install your app, run the following steps from a console like Konsole,
First test pip is installed (It always should be part of a default openSUSE install)

pip --help

You can now use pip to query the PiPi repository for your app, but you will prompted to upgrade pip itself. Do so with the following command and you will have downloaded and installed your first app from PiPi!

pip install --upgrade pip

Once pip has been upgraded, you can now search for your app

pip search iminuit

Your app should be displayed which means it’s available for your install. You can now install with

pip install iminuit

Note that the above should do many things automatically for you, like install the version of your app which matches your installed Python (2.7 today). If a new version of iminuit is released, you can update it the same way you updated pip above.

Any further questions, just post…

TSU

Thank you both a lot!

As a matter of fact - first thing I tried was

pip install iminuit

however, even though it then starts downloading, I keep getting the error:

Command “/usr/bin/python3 -c “import setuptools, tokenize;file=’/tmp/pip-build-_8w74btg/iminuit/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’
', ’
'), file, ‘exec’))” install --record /tmp/pip-axoyy3zd-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-_8w74btg/iminuit

(which of course I don’t understand) (what’s weird though is that it’s talking about python3 which I don’t want anyways)
So I thought maybe this wasn’t the right way or there could be another way.

I followed Henk’s advice to look for it somewhere else and since it states here https://pypi.python.org/pypi/iminuit/1.1.1 that it’s included in minuit2 I thought I might as well take this since I could find it through the opensuse package search: http://software.opensuse.org/package/python-pyMinuit2

Unfortunately, sth during the installation went wrong here as well (said it was only partially successful) but when I look for it in yast, it’s there. Not sure how to find out whether it’s working now, though.

Soo long story short, the thing that I actually need is the following: https://pypi.python.org/pypi/kafe/1.2.0
which of course I cannot find through the opensuse package search :smiley:

When I try “pip search kafe” (thanks for that hint, that’s useful!) it comes up, though, which is good.
However, installing it via pip doesn’t work here either…

oh, and by the way upgrading pip doesn’t work either but I thought this would probably not be the reason why it’s not working. Might be wrong though.^^ Maybe pip is the problem… that would suck.

When installing iminuit, you only posted the detailed failure, but didn’t post the lines immediately prior which identified the missing library file “cclplus.” Googling that error, you’ll find that it’s related to a missing g++ compiler. After installing that, you will find that you also need Python3 development headers.

So, bottom line to address all that and get your iminiut package installed you only need to run the following
First, add the Python3 repository which is always a good thing to do when you’re not simply running an application but are building from code which is what the package will do (It’ll build on the fly on your machine).

zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/python3/openSUSE_Leap_42.2/ 42.2_Python3

Refresh as I described in my previous post.
Update your system to the latest Python3 from your new repo

zypper update

Install the additional you need for iminuit, the first one is the g++ compiler, the second is the Python3 development headers

zypper in gcc-c++ python3-devel

Now you can install imnuit. It’ll run for awhile to build and then complete.
I didn’t take this further and try to invoke.

Looks like the kafe that’s found in PiPi has unspecified dependencies preventing it from installing.
Would require further investigation what is required.

TSU

Re kafe

According to your reference
https://pypi.python.org/pypi/kafe/1.2.0

You need to install those scientific projects in their entirety (these are likely the missing dependencies I described above when trying to install kafe immediately)
SciPy
NumPy
matplotlib

All of the above should be installable from PyPy

I’ve described above how to install iminuit.
Qt4 and PyQt4 should be installable from your current openSUSE repos.
Latex is pretty extensive. You <might> be able to satisfy your requirements by installing all of it with the following command. You’ll need texlive plugins for matplot, maybe others

zypper in texlive

You’ll find the dvipng conversion app in the openSUSE repos…

In general,
The instructions on the page for Fedora/RHEL/CentOS should work on openSUSE without any change, but I see there are some differences in how they say iminuit should be installed compared to what I posted (follow my instructions for this, not theirs).
Don’t worry about installing ROOT or root-python. I doubt those are needed on openSUSE and aren’t found.

Good Luck,
Try to work out what you can. If you have futher questions (and I’m guessing you will), post again.
TSU

TSU - I do not know how to thank you.

So the installation of iminuit worked - thank you! And thanks for your detailed explanation. That was great, really.

I already got all those other requirements (including quite a lot of texlive which I think should be enough), I just needed iminuit to work.
As for Qt4 I’m not sure though. Hope it’s there.

When trying to install kafe, this is what I get:
Collecting kafe
Could not find a version that satisfies the requirement kafe (from versions: )
No matching distribution found for kafe

Unknown, the error doesn’t seem very informative.
But, if I were to hazard a wild guess, the requirements file that is supposed to automatically download dependencies may be just plain faulty, name packages found in other distributions or simply can’t understand an openSUSE system. Someone would have to look at that in detail to know for sure.

In the meantime, what <should> work is to manually install all the listed dependencies and not rely on automation.
If your referenced page for kafe is correct and complete, it should provide enough info to get kafe installed.
But, documentation and what goes through the minds of Developers can sometimes be strange and parochial.
For those situations, for instance if I see Ubuntu instructions listed first (as in the kafe documentation) or other OS, then I’ll fire up a virtual machine and test whether one of the distros the Developers are clearly favoring works… and then from that figure out what’s missing to install on openSUSE.

TSU

Okay I see.
I’ve used kafe on openSuse before (obviously not on my computer though) which is why I expected it to work :wink:
I have no idea who installed it there but maybe somehow I’ll be able to find out and ask about it.

So far thank you so much for your help - this was way better than anything I expected and I feel like I’ve learned a lot in general, not just about my particular problem.

to be noted: kafe appears to be python 2 only package

yeah I knew that and I’ve always only been using python2 anyways

Turns out I misinterpreted pip - I assumed pip refers to python2 while pip3 refers to python3, however there is such as thing as “pip2” which I was supposed to use.

I feel so stupid… :smiley:

installation successful, now I just need to get it to work :slight_smile:

hehe, good story

installation successful
Awesome. Good on you for seeing it through.