简体   繁体   中英

Kivy module not found in vscode (Mac)

I have installed Kivy and when I used the IDLE app that came with Python I can import it and it runs perfectly. However, when I try to import it in vscode I get the error: ModuleNotFoundError: No module named 'kivy'. I can not find out what to do and the environment from the kivy dmg does not open so I feel lost. Can someone help me?

Two solutions

Check the python interpreter being used

When any .py file is open in the editor and is currently being used, near the bottom left, it says Python <version> <32/64>-bit . Tap it and select the directory that contains the python interpreter version that has kivy installed.

Check the following image for any help

单击左下角突出显示的区域

The platform I was using was a chromebook, but the location of changing the editor is the same

Manually install within VScode

Run pip install kivy to ensure that vscode uses it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM