Python error “ImportError: No module named”

后端 未结 29 3170
野的像风
野的像风 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:07

    Linux: Imported modules are located in /usr/local/lib/python2.7/dist-packages

    If you're using a module compiled in C, don't forget to chmod the .so file after sudo setup.py install.

    sudo chmod 755 /usr/local/lib/python2.7/dist-packages/*.so
    

提交回复
热议问题