PyCharm import external library

前端 未结 7 1811
广开言路
广开言路 2020-11-27 13:22

I am using PyCharm as an editor for python code in Houdini. Whenever I try to import the main Houdini library (hou) I get an error flagged in PyCharm. If I include the code

7条回答
  •  无人及你
    2020-11-27 14:00

    Update (2018-01-06): This answer is obsolete. Modern versions of PyCharm provide Paths via Settings ⇨ Project Interpreter ⇨ ⚙ ⇨ Show All ⇨ Show paths button.


    PyCharm Professional Edition has the Paths tab in Python Interpreters settings, but Community Edition apparently doesn't have it.

    As a workaround, you can create a symlink for your imported library under your project's root.

    For example:

    myproject
        mypackage
            __init__.py
        third_party -> /some/other/directory/third_party
    

提交回复
热议问题