python: sys.path[0] is reserved for the main script

This commit is contained in:
Pavel Rojtberg 2019-02-08 17:24:31 +01:00
parent eb00dce78e
commit f0ef4b2246

View File

@ -65,7 +65,7 @@ def bootstrap():
if DEBUG: print('OpenCV loader: BINARIES_PATHS={}'.format(str(l_vars['BINARIES_PATHS'])))
for p in reversed(l_vars['PYTHON_EXTENSIONS_PATHS']):
sys.path.insert(0, p)
sys.path.insert(1, p)
if os.name == 'nt':
os.environ['PATH'] = ';'.join(l_vars['BINARIES_PATHS']) + ';' + os.environ.get('PATH', '')