Mac - Python - import error: “No module named site”

后端 未结 6 1343
我在风中等你
我在风中等你 2020-12-10 14:52

Tonight I am trying to get the package called \"requests\" installed and have begun fumbling around with the terminal and do not have very much intuition when it comes to th

6条回答
  •  自闭症患者
    2020-12-10 15:12

    site.py is a standard module that is run by python by default. It allows tweaking sys.path and running some code before your code starts running. It should live in the standard library and can hardly be somehow absent. However, you can disable automatic importing of the module by passing -S switch to python.

    Anyway, you should somehow inspect why the module can not be imported. Try to examine sys.path list.

提交回复
热议问题