
Hi Andrew. As I'm not running SUSE, the packaging is different because it has been independently packaged by a SUSE user for use on non-SUSE platforms. The dual versions of qrtools.py is not a problem as it merely means that python will use the version that matches its own environment. I would suggest the first thing to do is to run python from a terminal session, and make a note of what version is configured as the default. ("rpm -q python" should also be informative.) It could be that SUSE has python 3.3 as the default. If multiple versions of python are installed, you will find that the versions probably have symlinks to names like python2, python2.7, python3, python3.3 etc. That would allow you to merely edit the /usr/bin/qtqr script file and set the python version explicitly to python2.7 for instance. #!/bin/sh exec /usr/bin/python /usr/bin/qtqr.py "$@" would become: #!/bin/sh exec /usr/bin/python2.7 /usr/bin/qtqr.py "$@" You may also need to make an alteration to the /usr/bin/qtqr.py script, and replace #!/usr/bin/env python with #!/usr/bin/env python2.7 Looking at the qtqr.py script, there are not a lot of libraries being included. sys, os and math are all standard python libraries. gtk, PyQt4 and qrtools however would need to be installed. Please note however, that I only dabble with python, I'm certainly no expert. See how you go. Regards, Morrie. From: Andrew Greig [mailto:pushin.linux@gmail.com] Sent: Monday, 2 February 2015 10:03 PM To: Morrie Wyatt Cc: 'LUV Main' Subject: Re: QR code generator Ok Morrie, I had a look myself thanks to your guidance: andrewg@andrewg:/> rpm -ql python-qrtools / /usr /usr/lib /usr/lib/python2.6 /usr/lib/python2.6/dist-packages /usr/lib/python2.6/dist-packages/qrtools.py /usr/lib/python2.7 /usr/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages/qrtools.py /usr/share /usr/share/doc /usr/share/doc/python-qrtools /usr/share/doc/python-qrtools/changelog.gz /usr/share/doc/python-qrtools/copyright /usr/share/python-qrtools and it is definitely in the dist-packages directories but does not work. Is it confused by the two dist-packages addresses? Should I delete the file from the python2.6/dist-packages location? Thanks Andrew On Mon, 2015-02-02 at 20:41 +1100, Morrie Wyatt wrote: Hi Andrew. Just tried the same on my Fedora 20 box at home, and had exactly the same error. The problem is easily discovered using: rpm -ql python-qrtools /qrtools.py /usr/share/doc/python-qrtools /usr/share/doc/python-qrtools/LICENCE /usr/share/doc/python-qrtools/copyright You will not that the qrtools.py ends up under the root directory, not in the usual site-packages directory /usr/lib/python2.7/site-packages/ I'm guessing the reason is that Fedora 20, and probably Suse too, have python versions 2.7 and 3.3 both simultaneously installed, so the packager took the lazy way out, leaving it up to the end user to put qrtools.py in in a more sensible place. I just moved qrtools.py to the above site-packages directory, and away it went. (It also doesn't seem to work under python3, probably as the various other python modules are not present under the /usr/lib/python3.3/site-packages/ directory.) So give it a try and see how you go. Regards, Morrie. From: luv-main [mailto:luv-main-bounces@luv.asn.au] On Behalf Of Andrew Greig Sent: Monday, 2 February 2015 4:23 PM To: LUV Main Subject: QR code generator Hi all, Could I please get some advice concerning my failure to get the QtQR program running under SuSe 13.1 I have downloaded the rpm and installed qtqr as well as python-qrtools I have no joy from the GUI "run" process and from the cli I get andrewg@andrewg:~> /usr/bin/qtqr Traceback (most recent call last): File "/usr/bin/qtqr", line 15, in <module> from qrtools import QR ImportError: No module named qrtools andrewg@andrewg:~> I tried modprobe but that command no longer works. I have a project where I need to generate around 350 different QR codes, all of the same format. And then I need to print them in such a way as to recognise each label easily to correctly locate them. Thanks Andrew Greig _______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main