SushiWaUmai
SushiWaUmai

Reputation: 359

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding, when trying to install packages on venv

I created a virtual environment through python -m venv env in python and tried to install packages with pip on it. I've got this error:

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'

I'm using Windows, does it has something to do with the environment variables? (PYTHONPATH, PYTHONHOME)

Upvotes: 3

Views: 2495

Answers (1)

SushiWaUmai
SushiWaUmai

Reputation: 359

Turns out that you have to reinstall python and check Add Python to environmental variables in Advanced Options.

Upvotes: 0

Related Questions