4

I use QGIS 3.6 and Python 3.7 and I try to install a package with pip in command line tool under Windows 7 but I have the following message :

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

Current thread 0x0000188c (most recent call first):

My path and PYTHONPATH are well configured with link to QGIS' Python folders. The problem appeared recently with use of Python 3.7.

3

If you use OSGeo4W try:

  1. In OSGeo4W installer: install python3-pip
  2. In OSGeo4W shell: call C:\OSGeo4W64\bin\py3_env.bat
  3. In OSGeo4W shell: pip3 install desired-package-name
1

I installed QGIS 3.2 back with Python 3.6 without changing anything else (except the paths of Windows) and I can now use pip install. I think the problem certainly comes from Python 3.7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.