Autocomplete in PyCharm for Python compiled extensions

后端 未结 9 851
遥遥无期
遥遥无期 2020-12-09 02:46

When writing Python code using compiled extensions (the OpenCV Python bindings, for example), PyCharm doesn\'t seem to be aware of their availability. The imports are marked

9条回答
  •  隐瞒了意图╮
    2020-12-09 03:28

    I hate to give a "works for me" answer, but maybe the details on my environment will help you identify the problem on your end.

    I've never used PyCharm before, but I just did a test on Mac 10.6.6 using PyCharm 1.1.1, with Macports opencv +python26. The autocomplete worked fine for me the first time. I also closed and re-ran PyCharm and was able to autocomplete without doing anything further. I also had no issue with autocomplete for other native extensions I tried like cjson, procname.

    Pycharm 1.1.1 importing opencv with autocomplete.

    Perhaps it is a platform-specific issue (Windows?), or a bug affecting an older version of PyCharm?

提交回复
热议问题