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

pull/13782/head
Pavel Rojtberg 6 years ago
parent eb00dce78e
commit f0ef4b2246
  1. 2
      modules/python/package/cv2/__init__.py

@ -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', '')

Loading…
Cancel
Save