Results 1 to 6 of 6

Thread: Python3 problem: ImportError: No module named pkg_resources

  1. #1

    Default 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.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,846
    Blog Entries
    15

    Default Re: Python3 problem: ImportError: No module named pkg_resources

    Hi
    If it's a python 2.7 application, then you would need python-setup tools installed, not python3....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Mar 2014
    Location
    US
    Posts
    115

    Default Re: Python3 problem: ImportError: No module named pkg_resources

    Quote Originally Posted by malcolmlewis View Post
    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.
    If it ain't broke, I just haven't gotten to it yet.
    openSUSE 42.1 (Leap) (x86_64); Intel Dual Core Proc @ 2.66 GHz; KDE Desktop

  4. #4

    Default Re: Python3 problem: ImportError: No module named pkg_resources

    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?

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,846
    Blog Entries
    15

    Default Re: Python3 problem: ImportError: No module named pkg_resources

    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!


  6. #6

    Default Re: Python3 problem: ImportError: No module named pkg_resources [SOLVED]

    Thanks all,

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

    Cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •