0

Installing Canto, the command line rss feed reader, I get this error,

$ ./canto Traceback (most recent call last): File "./canto", line 3, in <module> import canto.main File "/usr/lib/python2.7/site-packages/canto/main.py", line 36, in <module> import canto_fetch File "/usr/lib/python2.7/site-packages/canto/canto_fetch.py", line 26, in <module> import feedparser **ImportError: No module named feedparser** 

Feedparser 5.1, the latest, supports Python 3.2. Adding feedparser into /usr/lib/python3.2/site-packages, Canto can not find this package.

I have no knowledge of sorting out library dependencies if the application isn't configured to do so. Do I need to set a path variable for Canto to the newly installed feedparser in python3.2 or should I install an older version of Feedparser (presumably where Canto is looking in Python2.7, and where the Chardet encoding detection package is also located)?

2 Answers 2

1
  1. For whatever reason, the install of Canto was not correct, and you needed to uninstall it and reinstall. (When you wrote 'Adding feedparser into /usr/lib/python3.2/site-packages', it sounded like you might have actually copied it directly (wrong) instead of installing it per the instructions with: $ python setup.py install

  2. Anyway you redid 1. (delete and reinstall), restart python and import feedparser, so that fixed it. (I was skeptical of your theory that the install was correct but wrong version, since you got ImportError: No module named feedparser, instead of some other import-time error indicating feedparser was present, but the wrong version)

Sign up to request clarification or add additional context in comments.

2 Comments

Geez. Fortunately (or unfortunately) I've not solved this yet! I've updated the question with the full command to Canto and error. Your first question: I don't think so. Looking back, I don't recall adding feedparser. I seem to remember finding it with Python 3.2. Since Canto seems to be looking in the wrong place, I guessed the first thing to do was ask if I could configure Canto to find feedparser in the 3.2 dir. I'll try your instructions and reply here.
@xtian, since my answer gave you your solution, and I took time to write it, please upvote it.
0

Which version of python are you using to run it? That's what you need to fix. You don't want to have either version of python looking anywhere in the other's package path.

2 Comments

I haven't done anything other than download feedparser and put this into Python3.2 lib's directory. If the install script is any indication #!/usr/bin/env python then its using the older version of python2.7. Which then leads to the question, do I try to find an older version of feedparser5.1? put 5.1 into 2.7 and assume 'its a lib, its all good' or something else?
-1, (if I had a 125 reputation) "Which version of python..." is not an answer to the question, "How do I resolve Python site-package dependency?" Sorry. I wish someone would clean this up to give a proper answer because I still can't use this app that requires this library. Do I try to install an old copy of the lib or do something else?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.