Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
597 views
in Technique[技术] by (71.8m points)

Fatal Python error on Windows 10 ModuleNotFoundError: No module named 'encodings'

I'm installing Python on my Windows?10 laptop, and when I try to run it I get this:

Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x0000037c (most recent call first):

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I ran into this same issue on Windows 10. Here's how I fixed it:

  1. Open your 'Environment Variables' (Under 'System Properties').
  2. In the window that opens, select the 'Path' row, then click the 'Edit...' button.
  3. There should be two environment variables C:Python37-32Scripts and C:Python37-32 Then click 'OK' (Make sure to check that these path values correspond to the location and version of your Python install.)
  4. Next, in the top portion of the 'Environment Variables' window, look for the PYTHONHOME variable and make sure that it is also set to C:Python37-32

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...