This is an automated email from the ASF dual-hosted git repository. marcoabreu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new b2336b6 Fix Win Environ "PATH" does not exists Bug (#18402) b2336b6 is described below commit b2336b6da4850cf6bb2b033aaf0c7461a97b00b4 Author: chinakook <chinak...@msn.com> AuthorDate: Mon May 25 23:55:10 2020 +0800 Fix Win Environ "PATH" does not exists Bug (#18402) When "PATH" are not in the environment, we will get error when reading os.environ['PATH']. Change to os.environ.get('PATH', '') to fix it. --- python/mxnet/libinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mxnet/libinfo.py b/python/mxnet/libinfo.py index 5f65df3..ea674ac 100644 --- a/python/mxnet/libinfo.py +++ b/python/mxnet/libinfo.py @@ -59,7 +59,7 @@ def find_lib_path(prefix='libmxnet'): elif os.name == "posix" and os.environ.get('LD_LIBRARY_PATH', None): dll_path[0:0] = [p.strip() for p in os.environ['LD_LIBRARY_PATH'].split(":")] if os.name == 'nt': - os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ['PATH'] + os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ.get('PATH', '') dll_path = [os.path.join(p, prefix + '.dll') for p in dll_path] elif platform.system() == 'Darwin': dll_path = [os.path.join(p, prefix + '.dylib') for p in dll_path] + \