Python error “ImportError: No module named”

后端 未结 29 2630
野的像风
野的像风 2020-11-22 07:46

Python is installed in a local directory.

My directory tree looks like this:

(local directory)/site-packages/toolkit/interface.py

29条回答
  •  醉话见心
    2020-11-22 08:11

    After just suffering the same issue I found my resolution was to delete all pyc files from my project, it seems like these cached files were somehow causing this error.

    Easiest way I found to do this was to navigate to my project folder in Windows explorer and searching for *.pyc, then selecting all (Ctrl+A) and deleting them (Ctrl+X).

    Its possible I could have resolved my issues by just deleting the specific pyc file but I never tried this

提交回复
热议问题