baseimage-docker icon indicating copy to clipboard operation
baseimage-docker copied to clipboard

Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError

Open chasel opened this issue 7 years ago • 6 comments

system:centos 7 python default version [root@localhost ~]# python

Python 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

When i execute docker run -d -it --name phusion phusion/baseimage:0.11

docker logs phusion display: Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'

then i install python 3 and config env [root@localhost ~]# python Python 3.6.8 (default, May 2 2019, 20:40:44) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. but docker don't use python 3, the same error display

chasel avatar Jul 02 '19 11:07 chasel

Are you getting a python error when you run baseimage, or when you run python through baseimage? Please clarify, thanks and sorry for the delay in answering your report.

kingdonb avatar Jul 27 '19 17:07 kingdonb

Are you getting a python error when you run baseimage, or when you run python through baseimage? Please clarify, thanks and sorry for the delay in answering your report.

Yes, my docker build script require use python.

chasel avatar Aug 23 '19 05:08 chasel

I got the same problem, but not the same image which is harbor prepare.I found that the container runs ok in centos 7.8 & 7.7 env, and failure in centos 7.9.😂

c0derGitHub avatar Jun 25 '21 12:06 c0derGitHub

Which version of the baseimage is being used here? Has this been tested with the focal images?

samip5 avatar Sep 02 '21 20:09 samip5

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Sep 18 '21 01:09 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Sep 23 '21 01:09 github-actions[bot]