Import tvm in pycharm

Hello, I can use “import tvm” in conda environment by conda command, but when I set this conda environment in pycharm, there’s an error “ModuleNotFoundError: No module named ‘tvm’”.

Please!!!

Although I can always execute Python files on the command line, I still find it convenient to use pycharm. Please do you know the reason for the error in pycharm?

How do you install tvm? do you compile it yourself or install a Python package?

Did you manage to set the PYTHONPATH properly that points to the TVM directory in PyCharm?

Thank you for reply. I installed tvm in conda environment, and I can pass test cases in the official document by command line. The only problem is that I cannot pass test cases in pycharm with the same conda environment. I feel confused.

Thank you for your reply. I just set PYTHONPATH in “bashrc”. I choose the python interpreter in pycharm and I can import tvm in this env by conda command line (as shown in the picture). However, the tvm package still cannot be found by pycharm.

Thank you very much!!! That’s it!!! I added PYTHONPATH in the pycharm configurations and it is running. Thank you again!

1 Like