Skip to content

python loader breaks sys.path[0] #13779

@paroj

Description

@paroj
  • OpenCV => 4.x / 3.4.3+
>>> import sys
>>> sys.path[0]
''
>>> import cv2
>>> sys.path[0]
'/usr/local/lib/python3.6/dist-packages/cv2/python-3.6'

https://docs.python.org/3.7/library/sys.html

As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions