[GRASS-dev] winGRASS compiling fails with: Fatal Python error: initfsencoding: unable to load the file system codec

Helmut Kudrnovsky hellik at web.de
Sun Aug 11 04:50:52 PDT 2019


Helmut Kudrnovsky wrote
> trying to compile an uotodate winGRASS master, I get a lot of following
> errors:
> 
> e.g.
> 
> make[4]: Entering directory '/usr/src/grass_trunk_git/grass/lib/pngdriver'
> if [ "" != "" ] ; then
> GISRC=/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/demolocation/.grassrc79
> GISBASE=C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32
> PATH="/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/scripts:$PATH"
> PYTHONPATH="C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/etc/python;C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/gui/wxpython;$PYTHONPATH"
> PATH="/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/scripts:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/lib:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/lib:/c/OSGeo4W64/apps/Python37:/usr/bin:/mingw64/bin/:/c/OSGeo4W64/bin:/usr/src/grass_trunk_git/grass/mswindows/osgeo4w/lib:/usr/src/grass_trunk_git/grass/mswindows/osgeo4w"
> LC_ALL=C LANG=C LANGUAGE=C  --html-description < /dev/null | grep -v
> '
> </body>
> \|
> </html>
> ' > pngdriver.tmp.html ; fi
> VERSION_NUMBER=7.9.dev VERSION_DATE=2019 MODULE_TOPDIR=../.. \
>         python3
> /usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/tools/mkhtml.py
> pngdriver >
> /usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/docs/html/pngdriver.html
> Fatal Python error: initfsencoding: unable to load the file system codec
> ModuleNotFoundError: No module named 'encodings'
> 
> make[4]: Entering directory '/usr/src/grass_trunk_git/grass/lib/psdriver'
> if [ "" != "" ] ; then
> GISRC=/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/demolocation/.grassrc79
> GISBASE=C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32
> PATH="/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/scripts:$PATH"
> PYTHONPATH="C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/etc/python;C:/msys64/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/gui/wxpython;$PYTHONPATH"
> PATH="/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/bin:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/scripts:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/lib:/usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/lib:/c/OSGeo4W64/apps/Python37:/usr/bin:/mingw64/bin/:/c/OSGeo4W64/bin:/usr/src/grass_trunk_git/grass/mswindows/osgeo4w/lib:/usr/src/grass_trunk_git/grass/mswindows/osgeo4w"
> LC_ALL=C LANG=C LANGUAGE=C  --html-description < /dev/null | grep -v
> '
> </body>
> \|
> </html>
> ' > psdriver.tmp.html ; fi
> VERSION_NUMBER=7.9.dev VERSION_DATE=2019 MODULE_TOPDIR=../.. \
>         python3
> /usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/tools/mkhtml.py
> psdriver >
> /usr/src/grass_trunk_git/grass/dist.x86_64-w64-mingw32/docs/html/psdriver.html
> Fatal Python error: initfsencoding: unable to load the file system codec
> ModuleNotFoundError: No module named 'encodings'
> 
> it seems following python error:
> 
> ***
> Fatal Python error: initfsencoding: unable to load the file system codec
> ModuleNotFoundError: No module named 'encodings'
> ***
> 
> any idea?

it seems to be some PATH issue according to e.g.

https://bugs.python.org/issue27054
https://stackoverflow.com/questions/42512817/fatal-python-error-on-windows-10-modulenotfounderror-no-module-named-encodings?rq=1
https://vi.stackexchange.com/questions/16216/fatal-python-error-py-initialize-unable-to-load-the-file-system-codec-importer?rq=1
...

***
hkmyr at DESKTOP-VADT8Q4 MINGW64 /usr/src/grass_trunk_git/grass
$ python
Python 3.7.4 (default, Jul 30 2019, 07:31:04)  [GCC 9.1.0 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', 'C:/msys64/mingw64/lib/python37.zip',
'C:/msys64/mingw64/lib/python3.7', 'C:/msys64/mingw64/bin',
'C:/msys64/mingw64/lib/python3.7/lib-dynload',
'C:/msys64/mingw64/lib/python3.7/site-packages']
>>>
***

have to investigate ...




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html


More information about the grass-dev mailing list