Here is the error i recieve randomly when my code runs:
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 603, in <module>
main()
File "/usr/lib/python3.7/site.py", line 590, in main
known_paths = addsitepackages(known_paths)
File "/usr/lib/python3.7/site.py", line 365, in addsitepackages
if os.path.isdir(sitedir):
File "/usr/lib/python3.7/genericpath.py", line 42, in isdir
st = os.stat(s)
KeyboardInterrupt
I have looked and the site.py file does exist in the python3.7 directory. would upgrading to python3.9 fix this issue?
EDIT: There is no keyboard or mouse plugged into the raspberry pi. I don't know how its keyboardInterrupting.
question from:
https://stackoverflow.com/questions/65838960/fatal-python-error-initsite-failed-to-import-site-module 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…