Menu

ImportError: No module named CollectD_CSV

2015-03-11
2015-03-12
  • Ilya Evseev

    Ilya Evseev - 2015-03-11

    Ubuntu 14.10
    Python 2.7.6 from official repo.
    Collectd_CSV is installed using python-pip:

    # pip install collectd-csv
    Downloading/unpacking collectd-csv
      Downloading collectd-csv-0.6.1.tar.gz
      Running setup.py (path:/tmp/pip_build_root/collectd-csv/setup.py)
    egg_info for package collectd-csv
    
    Installing collected packages: collectd-csv
      Running setup.py install for collectd-csv
        changing mode of build/scripts-2.7/fetchCSV.py from 644 to 755
        changing mode of build/scripts-2.7/monitorCSV.py from 644 to 755
    
        changing mode of /usr/local/bin/fetchCSV.py to 755
        changing mode of /usr/local/bin/monitorCSV.py to 755
    Successfully installed collectd-csv
    Cleaning up...
    #
    

    All files seems present:

    # ls -l /usr/local/lib/python2.7/dist-packages/CollectD_CSV
    total 32
    -rw-r--r-- 1 root staff 9863 Mar 10 23:57 CollectD_CSV.py
    -rw-r--r-- 1 root staff 7037 Mar 10 23:57 CollectD_CSV.pyc
    -rw-r--r-- 1 root staff   40 Mar 10 23:57 __init__.py
    -rw-r--r-- 1 root staff  206 Mar 10 23:57 __init__.pyc
    drwxr-sr-x 2 root staff 4096 Mar 10 23:57 plugins
    

    But when I try to use it, it fails:

    >>> import CollectD_CSV
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.7/dist- packages/CollectD_CSV/__init__.py",
    line 1, in <module>
        from CollectD_CSV.CollectD_CSV import *
    ImportError: No module named CollectD_CSV
    

    How to solve this problem?

    Ilya

     

    Last edit: Ilya Evseev 2015-03-11
  • Petteri Tolonen

    Petteri Tolonen - 2015-03-11

    Thanks for the report. It seems to work when you change the one line in

    /usr/local/lib/python2.7/dist-packages/CollectD_CSV/__init__.py
    

    to:

    from CollectD_CSV import *
    

    If you're in a hurry, just apply this fix locally for now. I'm just wondering how it has worked for me before. I'm a bit busy now, but I'll release a new version in pip when I have some more time.

     
  • Ilya Evseev

    Ilya Evseev - 2015-03-12

    Ok, this trick works well.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.