LarsaSolidor
LarsaSolidor

Reputation: 133

Unable to Load Python 3.6 on Windows 7

Fresh install of Python 3.6 on Windows 7.

I am presented with the following error when attempting to open Python 3.6:

Fatal Python error: Py_Initialise: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000252c (most recent call first):

I've tried:

Upvotes: 0

Views: 334

Answers (2)

LarsaSolidor
LarsaSolidor

Reputation: 133

Thank you, erkysun.

Removing all Python related directory paths from my environment Path, PYTHONPATH, and PYTHONHOME variables solved the issues I was experiencing.

For the benefit of anyone else experiencing this issue in the future, I removed these directory paths by:

  1. Typing 'env' into my search Windows 7 search bar, and opening 'Edit the system environment variables'
  2. Clicking the 'Environment Variables...' button in the bottom right hand corner of the dialogue box which appears
  3. Locating Path, PYTHONPATH, and PYTHONHOME and making the appropriate deletions.

Thanks for your help everyone.

Upvotes: 1

Sebin
Sebin

Reputation: 11

Download this file and place under Lib folder in python directory

https://github.com/python/cpython/blob/3.6/Lib/codecs.py

Upvotes: 1

Related Questions