This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Type: crash Stage: resolved
Components: Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, nithish
Priority: normal Keywords:

Created on 2020-11-22 15:21 by nithish, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg381618 - (view) Author: Vuyyuru Sai Nithish (nithish) Date: 2020-11-22 15:31
Im using django on an virtual env, when im trying to use pandas it was giving me and error message(IDE: VScode) i.e, module error: pandas was not found. I reinstalled python from 3.8.2 to 3.9 and now in my virtual environment it was giving an error that Django is not installed, and when I checked django in virtual env this is displayed

(test) C:\Users\saini\Envs>django-admin --version
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'c:\users\saini\envs\test\scripts\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'c:\\users\\saini\\envs\\test\\scripts\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'c:\\users\\saini\\envs\\test\\scripts\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'c:\\users\\saini\\envs\\test\\scripts\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'c:\\users\\saini\\appdata\\local\\programs\\python\\python38',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00000790 (most recent call first):
<no Python frame>
msg381621 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2020-11-22 16:57
> I reinstalled python from 3.8.2 to 3.9

Going from 3.8 to 3.9 is not an in-place upgrade. You need to create a new virtual environment that references the base 3.9 installation.
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86604
2020-11-22 18:03:53eryksunsetstage: backport needed -> resolved
2020-11-22 16:57:59eryksunsetstatus: open -> closed

nosy: + eryksun
messages: + msg381621

resolution: not a bug
stage: backport needed
2020-11-22 15:31:04nithishsetmessages: + msg381618
2020-11-22 15:21:58nithishcreate