What python modules (or packages) does variety need?

Asked by Aminda Suomalainen

I am trying to install Variety on Debian Sid. The setup.py gives me following errors (it gave one more, but I managed to solve it):

```
% python setup.py install --user
ERROR:root:Could not find any typelib for Notify
ERROR: Python module DominantColors not found
ERROR:root:Could not find any typelib for Notify
ERROR: Python module Util not found
ERROR:root:Could not find any typelib for Notify
ERROR: Python module DominantColors not found
running install
Traceback (most recent call last):
  File "setup.py", line 114, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.7/dist-packages/DistUtilsExtra/auto.py", line 100, in setup
    distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 76, in run
    values = {'__variety_data_directory__': "'%s'" % (self.prefix + '/share/variety/'),
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```

I am not able to find packages "python-nomiantcolors" nor "python-util" neither from Debian repositories nor pip.

Question information

Language:
English Edit question
Status:
Solved
For:
Variety Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Peter Levi (peterlevi) said :
#1

Both DominantColors and Util are internal Variety files (see them in variety folder), not external module dependencies. To be fair I haven't personally tried running setup.py, I use Quickly to package it for Ubuntu. You can see the list of external module dependencies in debian/control.

1. Is Quickly available for Debian?
2. If you install the external dependencies (listed in debian/control) you should be able to run Variety even without running setup.py. It is pretty self contained and can run from its sources (just run bin/variety -v). Please tell me if this approach works for you.

I'm not on my dev machine right now, but later on I will try running setup.py myself to see why it can't find DominantColors and Util classes.

Revision history for this message
Aminda Suomalainen (mikaela) said :
#2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

10.11.2012 18:20, Peter Levi kirjoitti:
> 1. Is Quickly available for Debian?

Quickly looking at "apt-cache search quickly" doesn't seem to show it.
It gives long list of other packages. What is the package name in Ubuntu?

> 2. If you install the external dependencies (listed in
> debian/control) you should be able to run Variety even without
> running setup.py. It is pretty self contained and can run from its
> sources (just run bin/variety -v). Please tell me if this approach
> works for you.

I think that I have installed them, but

```
% python setup.py install --user
ERROR:root:Could not find any typelib for Notify
ERROR: Python module DominantColors not found
ERROR:root:Could not find any typelib for Notify
ERROR: Python module Util not found
ERROR:root:Could not find any typelib for Notify
ERROR: Python module DominantColors not found
running install
Traceback (most recent call last):
  File "setup.py", line 114, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.7/dist-packages/DistUtilsExtra/auto.py", line
100, in setup
    distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 76, in run
    values = {'__variety_data_directory__': "'%s'" % (self.prefix +
'/share/variety/'),
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
mkaysi@Devgan ~/Lataukset/variety
% bin/variety
ERROR:root:Could not find any typelib for Notify
Traceback (most recent call last):
  File "bin/variety", line 43, in <module>
    import variety
  File "/home/mkaysi/Lataukset/variety/variety/__init__.py", line 29,
in <module>
    from variety import VarietyWindow
  File "/home/mkaysi/Lataukset/variety/variety/VarietyWindow.py", line
26, in <module>
    from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, Gio,
Notify # pylint: disable=E0611
ImportError: cannot import name Notify
```

- --
Mika Suomalainen
http://mkaysi.github.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Homepage: http://mkaysi.github.com/
Comment: Public key: http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: gpg --fetch-keys http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A AA65 4DB5 3CFE 82A4 6728
Comment: I have personal problem with PGP/MIME...
Comment: ...so signature *IS* long. See http://git.io/6FLzWg
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBCgAGBQJQr2oEAAoJEE21PP6CpGcoiLwP/3KjgSwLmirZWUnzY6RYWGra
Q+K6T4dkGtfObzDEv8Jjz3cQy9WrMET1FaY9W1B/O7Yu6JXtCGkj1EXCuZL6ki0H
pVJqY5zuiL3Th5Amu7rmctOnODiv1d5zDnvAK5DWP52qBX/3uKcrskTCfonTAyJ9
Yn3klLg1pZFUtHLF7KLj+sc5RpedMQGTowgEqqbkXj7IhsirDzSlzz02XhYV4tPN
rpkdW4eioxjQAkHFXr0CDACApPAyRrYB1HseRCp960VqZb/wfV8NK1k1p+S+f/Il
7GnxvNa2Jv8GbFmO+kiuicpmzCPhl39I1/2newRQp7gDIaJFfDiykdyJBGxPPHPB
QMEsDfzju2iNZvgPl0UuN+PQA0b68wH+eiuA6Ni+bZn2lb7Fw4W0ceMctwOe1FyQ
oexeM5UGsnZlwoNzP1UnIH9bvDeE+oiEUxsie+4xEc2nBdDvzN8BV6yzuIa+emBi
ZUFQNfbA4Wt+g57Rjh3uYrCc3sYRd0XOuqR1d/VqcJAniEnHf4sySKcrw8gN+nDo
sJi7o/ka3bT1ZnkRpsp8e/hhkZVrgk/3DtluZnLKFRd2sMGvs+xjTJKSK+Ufazzd
2EMM6Rp7p+wVtdtGTBnHDOOWWDsnW5jjNdeQGg2fHrEauy4oiE1wtW9AjCQ3n+Ie
QcNAdp78PkM/8CCNFyjy
=KOo3
-----END PGP SIGNATURE-----

Revision history for this message
Peter Levi (peterlevi) said :
#3

1. Package in Ubuntu is "quickly"
2. No, don't try to tun setup.py. Just unpack Variety's tar somewhere, install the external dependencies (listed in debian/control), and then directly run bin/variety. Setup.py is something generated and used by Quickly that I'm not sure is supposed to be run manually.

Revision history for this message
Aminda Suomalainen (mikaela) said :
#4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

23.11.2012 15:01, Peter Levi kirjoitti:
> 1. Package in Ubuntu is "quickly"

It doesn't seem to exist in Debian.

```
% LC_ALL=en_EN.UTF-8 apt-cache show quickly
N: Unable to locate package quickly
E: No packages found
```

> 2. No, don't try to tun setup.py. Just unpack Variety's tar
> somewhere, install the external dependencies (listed in
> debian/control), and then directly run bin/variety. Setup.py is
> something generated and used by Quickly that I'm not sure is
> supposed to be run manually.

I have now installed them and variety starts.

Thank you for your help.

- --
Mika Suomalainen
http://mkaysi.github.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Homepage: http://mkaysi.github.com/
Comment: Public key: http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: gpg --fetch-keys http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A AA65 4DB5 3CFE 82A4 6728
Comment: I have personal problem with PGP/MIME...
Comment: ...so signature *IS* long. See http://git.io/6FLzWg
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBCgAGBQJQr5G2AAoJEE21PP6CpGco/dsP/13CdOdjx4hu5vbr7OT/IHHR
wBzma18vwYbSxY5fZTuy4pdspOrFJklOOEgmi62LJ02WDf4/4HANr77ar17bGy1L
okT58065KQLNqMqHvlLXx5reyel3f5mjp+ADVEJQxjFZd42TuVMyKYw82cx98qg4
FZtonvp5ftv0tb+uHg/I/Aizz/k2abTGZyJfjSM934EysQ/nz9j0ONFM2QH61foj
FG5fHYYEIpuskgX+Qx5ENBOCYpA1EjpdUGBXv/SbBtUqTXa34M+Zut5K6bwfl6TI
8pICMA+AcknshlVXimLP8Nyee97EeMPpRBaPOo0CwYSRy8whycXEGkJoye28aj1j
RBgIrJZL/d9HuaJYow76B82fbxlCM6a5Z5+nNNiUgf1pQqZHcMLxX8YvdaYatvzz
xe1TVcWyKHs0CVI5G6EqRT307lzbtalfxPs/0DqV85b3qu1eufO8kljVVoL2NOFT
q/5nmQsdXxpT2XKAPPD4YLzTsQ+vqKcpKUSoAaMcnap2nQfZNddf8aARXqArWOn8
N+fe6CGruLWXHzAykgdOl0b8Dvs5INmRKcH9H8uZR+wf9N9Jd+7Ij6uG8Uw20Ol2
aIqvguRhdqtd0YPt/zM+Yxw5znHyIv9zrI38tKEwzcgpl0yTw+PAYPXRFm0FaSH5
kddV+VGqBUqwyBzDcy5+
=5bYM
-----END PGP SIGNATURE-----

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Peter Levi (peterlevi) said :
#6

User issue is resolved

Revision history for this message
Peter Levi (peterlevi) said :
#7

Full info on how to run from source:

Variety runs on Python 2 (2.7.3+).

1. Download the source archive in tar.gz and unpack it to some directory. Or, alternatively, install Bazaar and run bzr branch lp:variety – this means you will be running from the latest trunk development version (which I try to keep stable).

2. Install the dependencies:

gir1.2-notify-0.7, python-configobj, python-pyexiv2, python-pycurl, gir1.2-gtk-3.0, python-dbus, gir1.2-pango-1.0, gir1.2-glib-2.0, python-imaging, python-cairo, gir1.2-gdkpixbuf-.0, python-bs4, gir1.2-webkit-3.0, yelp, imagemagick, python-lxml, gir1.2-appindicator3-0.1.

gir1.2-appindicator3-0.1 is optional – don’t worry if it is not present in your distribution, it is for Variety’s indicator icon, but Variety will fallback to a classic Gnome status icon if it is not present.

3. Now simply run it. No building or installing is necessary:

cd <folder with Variety's sources>
bin/variety -v