Repository navigation
opencv-python intellisense is not working under conda #99
Description
Activity
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Nilesh Kevlani (@njkevlani) on July 27, 2017 17:57
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Siddhartha Gandhi (@gandhis1) on July 27, 2017 19:20
Can you use the Jedi API to determine whether it is a Jedi issue?
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Nilesh Kevlani (@njkevlani) on July 27, 2017 19:24
Can you explain it in a better way? Siddhartha Gandhi (@gandhis1)
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Siddhartha Gandhi (@gandhis1) on July 27, 2017 20:26
Import
jedi. Take, the code, put it in thejedi.Scriptconstructor, and then call.completions(). Do you get any results?E.g.
print(jedi.Script("import cv2\ncv2.").completions())See below for more information:
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Nilesh Kevlani (@njkevlani) on July 27, 2017 20:45
Here you go:
[<Completion: abs>, <Completion: all>, <Completion: any>, <Completion: ArithmeticError>, <Completion: ascii>, <Completion:assert>, <Completion: AssertionError>, <Completion: async>, <Completion: AttributeError>, <Completion: await>, <Completion: BaseException>, <Completion: bin>, <Completion: BlockingIOError>, <Completion: bool>, <Completion: break>, <Completion: BrokenPipeError>, <Completion: BufferError>, <Completion: bytearray>, <Completion: bytes>, <Completion: BytesWarning>, <Completion: callable>, <Completion: ChildProcessError>, <Completion: chr>, <Completion: class>, <Completion: classmethod>, <Completion: compile>, <Completion: complex>, <Completion: ConnectionAbortedError>, <Completion: ConnectionError>, <Completion:ConnectionRefusedError>, <Completion: ConnectionResetError>, <Completion: continue>, <Completion: copyright>, <Completion:credits>, <Completion: cv2>, <Completion: def>, <Completion: del>, <Completion: delattr>, <Completion: DeprecationWarning>, <Completion: dict>, <Completion: dir>, <Completion: divmod>, <Completion: Ellipsis>, <Completion: enumerate>, <Completion: EnvironmentError>, <Completion: EOFError>, <Completion: eval>, <Completion: Exception>, <Completion: exec>, <Completion: exit>, <Completion: False>, <Completion: FileExistsError>, <Completion: FileNotFoundError>, <Completion: filter>, <Completion: float>, <Completion: FloatingPointError>, <Completion: for>, <Completion: format>, <Completion: from>, <Completion: frozenset>, <Completion: FutureWarning>, <Completion: GeneratorExit>, <Completion: getattr>, <Completion: global>, <Completion: globals>, <Completion: hasattr>, <Completion: hash>, <Completion: help>, <Completion: hex>, <Completion: id>, <Completion: if>, <Completion: import>, <Completion: ImportError>, <Completion: ImportWarning>, <Completion: IndentationError>, <Completion: IndexError>, <Completion: input>, <Completion: int>, <Completion: InterruptedError>, <Completion: IOError>, <Completion: IsADirectoryError>, <Completion: isinstance>, <Completion: issubclass>, <Completion: iter>, <Completion: KeyboardInterrupt>, <Completion: KeyError>, <Completion: lambda>, <Completion: len>, <Completion: license>, <Completion: list>, <Completion: locals>, <Completion: LookupError>, <Completion: map>, <Completion: max>, <Completion: MemoryError>, <Completion: memoryview>, <Completion: min>, <Completion: NameError>, <Completion: next>, <Completion: None>, <Completion: nonlocal>, <Completion: not>, <Completion: NotADirectoryError>, <Completion: NotImplemented>, <Completion: NotImplementedError>, <Completion: np>, <Completion: object>, <Completion: oct>, <Completion: open>, <Completion: ord>, <Completion: OSError>, <Completion: OverflowError>, <Completion: pass>, <Completion: PendingDeprecationWarning>, <Completion: PermissionError>, <Completion: pow>, <Completion: print>, <Completion: process>, <Completion: ProcessLookupError>, <Completion: property>, <Completion: quit>, <Completion: raise>, <Completion: range>, <Completion: RecursionError>, <Completion: ReferenceError>, <Completion: repr>, <Completion: ResourceWarning>, <Completion: return>, <Completion: reversed>, <Completion: round>, <Completion: RuntimeError>, <Completion: RuntimeWarning>, <Completion: set>, <Completion: setattr>, <Completion: slice>, <Completion: sorted>, <Completion: staticmethod>, <Completion: StopAsyncIteration>, <Completion: StopIteration>, <Completion: str>, <Completion: sum>, <Completion: super>, <Completion: SyntaxError>, <Completion: SyntaxWarning>, <Completion: SystemError>, <Completion: SystemExit>, <Completion: TabError>, <Completion: TimeoutError>, <Completion: True>, <Completion: try>, <Completion: tuple>, <Completion: type>, <Completion: TypeError>, <Completion: UnboundLocalError>, <Completion: UnicodeDecodeError>, <Completion:UnicodeEncodeError>, <Completion: UnicodeError>, <Completion: UnicodeTranslateError>, <Completion: UnicodeWarning>, <Completion: UserWarning>, <Completion: ValueError>, <Completion: vars>, <Completion: Warning>, <Completion: while>, <Completion:with>, <Completion: yield>, <Completion: ZeroDivisionError>, <Completion: zip>, <Completion: __build_class__>, <Completion: __debug__>, <Completion: __doc__>, <Completion: __file__>, <Completion: __import__>, <Completion: __loader__>, <Completion: __name__>, <Completion: __package__>, <Completion: __spec__>]DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Nilesh Kevlani (@njkevlani) on July 27, 2017 20:47
out put for
print(jedi.Script("import cv2\ncv2.").completions())
is attached
out.txtDonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Bob (@fluxin) on July 29, 2017 12:25
Same issue here, same completions.
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Siddhartha Gandhi (@gandhis1) on July 29, 2017 15:33
Since the completions aren't correct that means it's a Jedi issue, no? Post this in that repo.
DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom Nilesh Kevlani (@njkevlani) on July 29, 2017 15:49
Siddhartha Gandhi (@gandhis1), in my last post,
"
out put for
print(jedi.Script("import cv2\ncv2.").completions())
is attached
out.txt
"
out.txt contains correct completions.DonJayamanne commented
on Nov 13, 2017 AuthorMore actionsFrom wkema on November 5, 2017 6:55
manually setting "jedi path" to the newest release of jedi (0.11.0) locally solves the cv2 problem. But some other features of the extension will be lose like "go to definition" etc. hmmm....
18 remaining items
DonJayamanne commented
on Feb 26, 2018 AuthorMore actionsanribras Guillermo Barbadillo (@ironbar) denck007
Please could you download the Insiders Build and test this out.
Note: This isn't the insiders build of VS Code, its our dev version of the extension.
It contains a number of fixes related to intellisense, and I'm hoping this resolves the issue you are experiencing.Please test and let me know how it goes.
Reacted by denck007 and Tzu-TingThe insiders build of the extension works! Code completion for opencv works now! Thank you Don Jayamanne (@DonJayamanne)
+1 the insiders build works
python 3.6.4
vscode 1.20.1
archlinuxDonJayamanne commented
on Feb 27, 2018 AuthorMore actionsThanks guys
- added and removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Feb 27, 2018 I confirm that it works also for python 2.7
Thanks for your work!- Autocompletion works now. Still I met a tip: [pylint] E1101:Module 'cv2' has no 'Laplacian' member cv2: cv2 and ignored it by adding "python.linting.pylintArgs": [ "--extension-pkg-whitelist=cv2" ], in settings and perfect for me. Thank you @don Jayamanne At 2018-02-27 03:00:30, "Don Jayamanne" <[email protected]> wrote: @anribras@ironbar@denck007 Please could you download the Insiders Build and test this out. Note: This isn't the insiders build of VS Code, its our dev version of the extension. It contains a number of fixes related to intellisense, and I'm hoping this resolves the issue you are experiencing. Please test and let me know how it goes. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Insiders build .vsix installed and confirmed working with autocompletion for OpenCV-Python.
Thank You Don Jayamanne (@DonJayamanne)stevecfloat How long does it take to compile the vscode python extension on your machine? I've in the second task for almost 2 hours. Could you guys provide your .vsix file please?
- locked as resolved and limited conversation to collaborators
on May 22, 2018 Zhuo Zhang (@zchrissirhcz) it shouldn't take that long. You can always download a development build of the extension.

From sarkarstanmoy on April 3, 2017 18:4
Environment data
VS Code version: latest
Python Extension version:
Python Version: 3.5
OS and version: windows 10
Actual behavior
After installing and importing opencv-python package in my project file intellisense is not firing up.
Expected behavior
Steps to reproduce:
Settings
Your launch.json (if dealing with debugger issues):
{ "version": "0.2.0", "configurations": [ { "name": "Python", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config.python.pythonPath}", "program": "${file}", "cwd": "${workspaceRoot}", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "PySpark", "type": "python", "request": "launch", "stopOnEntry": true, "osx": { "pythonPath": "${env.SPARK_HOME}/bin/spark-submit" }, "windows": { "pythonPath": "${env.SPARK_HOME}/bin/spark-submit.cmd" }, "linux": { "pythonPath": "${env.SPARK_HOME}/bin/spark-submit" }, "program": "${file}", "cwd": "${workspaceRoot}", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python Module", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config.python.pythonPath}", "module": "module.name", "cwd": "${workspaceRoot}", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Integrated Terminal/Console", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config.python.pythonPath}", "program": "${file}", "cwd": "null", "console": "integratedTerminal", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "External Terminal/Console", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config.python.pythonPath}", "program": "${file}", "cwd": "null", "console": "externalTerminal", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "Django", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config.python.pythonPath}", "program": "${workspaceRoot}/manage.py", "cwd": "${workspaceRoot}", "args": [ "runserver", "--noreload" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput", "DjangoDebugging" ] }, { "name": "Flask", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config.python.pythonPath}", "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter", "cwd": "${workspaceRoot}", "env": { "FLASK_APP": "${workspaceRoot}/quickstart/app.py" }, "args": [ "run", "--no-debugger", "--no-reload" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Flask (old)", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config.python.pythonPath}", "program": "${workspaceRoot}/run.py", "cwd": "${workspaceRoot}", "args": [], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Watson", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config.python.pythonPath}", "program": "${workspaceRoot}/console.py", "cwd": "${workspaceRoot}", "args": [ "dev", "runserver", "--noreload=True" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Attach (Remote Debug)", "type": "python", "request": "attach", "localRoot": "${workspaceRoot}", "remoteRoot": "${workspaceRoot}", "port": 3000, "secret": "my_secret", "host": "localhost" } ] }Your settings.json:
Logs
Output from
Pythonoutput panelOutput from
Console window(Help->Developer Tools menu)Copied from original issue: DonJayamanne/pythonVSCode#858