Tuesday, 25 September 2018

Fix Import error on using environb in python

from os import environb as environ

On typing the above command in Windows Anaconda python 3.6 installation, I get this error:

ImportError: cannot import name 'environb'.

This seems to be because,

environb is only available if supports_bytes_environ is True.

and

supports_bytes_environ is False on Windows.

Is there a way to get around this?

ref: https://docs.python.org/3/library/os.html#os.environb



from Fix Import error on using environb in python

No comments:

Post a Comment