Python error: ImportError: cannot import name Akismet

前端 未结 6 1065
时光说笑
时光说笑 2021-02-13 20:40

I\'ve seen many similar errors, but I can\'t see a solution that applies to my particular problem.

I\'m trying to use the Akismet module which is on my PYTHONPATH, then

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-13 21:34

    Simple:

    1. Make sure you have installed akismet (system-wide or virtualenv)
    2. Verify by pasting (import akismet) into a python shell
    3. CD into the root directory of your project and run (find . -name akismet.py)
    4. If you find a file with that name, see if you can rename it
    5. Then run (find . -name akismet.pyc -print0 | xargs -0 rm -rf)

    Now run your application and you should be good to go.

提交回复
热议问题