Python3 problem: ImportError: No module named pkg_resources

I am trying to run Mnemosyne (flash card learning app). I had no problems with this app in 13.1, I keep getting the error:

Traceback (most recent call last):
File “/usr/bin/mnemosyne”, line 4, in <module>
import pkg_resources
ImportError: No module named pkg_resources

I un-installed and re-installed python3-setuptools but it made no difference - anyone have a fix for this?

Thanks for any help.

Hi
If it’s a python 2.7 application, then you would need python-setup tools installed, not python3…

As Malcolm points out, you should be using python 2.x, not 3.x, see bottom of page here:

http://mnemosyne-proj.org/hacking-mnemosyne

To see if your module is installed, open a terminal and type ‘python’ (without quotes). By default (unless you’ve changed it) you should see " Welcome to Python 2.7! …"
At the prompt, type ‘help()’ (without quotes), you should see 'help> ’
Type ‘modules’ (without quotes), this will show all installed mods

You will probably see your pkg_resources listed (as it’s added by default). While your at it, you might want to verify that you have the other required mods listed on that site.

Hi,

Thanks for the help sparkz_alot and malcolm.

I did a clean install of OS 13.2 KDE, so whatever python packages came with the distro are what’s installed. I did what you suggested and this is the installed python:

Python 2.7.8 (default, Sep 30 2014, 15:34:38) [GCC] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

however, there is no module called pkg_resources. Should I remove python3-setuptools and install python-setuptools or can the 2 live side by side?

On Thu 13 Nov 2014 05:06:01 PM CST, londondaveuk wrote:

Hi,

Thanks for the help sparkz_alot and malcolm.

I did a clean install of OS 13.2 KDE, so whatever python packages came
with the distro are what’s installed. I did what you suggested and this
is the installed python:

> Python 2.7.8 (default, Sep 30 2014, 15:34:38) [GCC] on linux2
> Type “help”, “copyright”, “credits” or “license” for more information.

however, there is no module called pkg_resources. Should I remove
python3-setuptools and install python-setuptools or can the 2 live side
by side?

Hi
They should co-exist fine, as they live in the
respective /usr/lib/pythonX.X directories


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Thanks all,

After installing python-setuptools, python-matplotlib, python-matplotlib-qt4 and python-qt4 mnemosyne is working again.

Cheers.