'Problem with importing discord in pyCharm

I just want to start writing a discord bot in pyCharm but somehow import discord doesn't work. Of cause I installed the discord library with pip and if I type in pip freeze discord is also in the list of installed modules ().

I don't use pyCharm that long and probably I just did something wrong but I used pygame the same way and there it worked perfectly. Can somebody help me? :)

enter image description here



Solution 1:[1]

Possible issues - 1:Pycharm is using a venv where discord is not available or not installed , 2:Discord module is not properly installed , 3:The name of your file is also named "discord.py" causing a circular import , 4:The module discord is not in PATH

I dont know how to solve issue 1 but for

2: pip uninstall discord --> pip install discord

3:Rename your file

4: Move the module discord to PATH or add the path of the module to the PATH variable https://www.java.com/en/download/help/path.html

Hope this helps :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Global-Occult