I have a Conda environment in which I installed the KivyMD package via pip (inside the environment).
In a PyCharm project, I copied the example code from KivyMD documentation. This project has my conda environment as interpreter. The interpreter is working perfectly with this (other files, which use other packages) and other projects. But I keep getting errors when trying to run the file with this package.
The code from the example, that I'm trying to run (https://kivymd.readthedocs.io/en/latest/getting-started.html):
from kivymd.app import MDApp
from kivymd.uix.label import MDLabel
class MainApp(MDApp):
def build(self):
return MDLabel(text="Hello, World", halign="center")
MainApp().run()
"Error: ModuleNotFoundError: No module named 'kivymd.app'; 'kivymd' is not a package"
I've tried uninstalling and reinstalling it again, but got the same problem. The package shows correctly both in "conda list" in the environment and in the PyCharm packages panel. Both Python and Pip used by Conda are in folders inside the environment folder as well (checked with "where" command). I'm using Windows and I double checked that I have the latest Anaconda version.
I've tried running the file directly on command line (outside PyCharm), but got the same problem as well.
How can I fix this?