I Installed a Module Called Discord and When Using “import discord” I Get the Error: “ModuleNotFoundError: No module named 'discord'”

☆樱花仙子☆ 提交于 2019-12-11 15:19:22

问题


The module 'discord' I installed in the command prompt which I ran as administrator can't be found. It's located in my site-packages directory along with some other modules such as setuptools which when I import, are imported successfully without error. However, discord which is in the same directory doesn't. In the environment variables I have Path which I've specified to site-packages but I still receive the error that discord cannot be found.


回答1:


That error is common on Python version 3.7

If you are trying to run your bot or discord app with Python 3.7 and getting an error such as Invalid Syntax, we recommend that you install Python 3.6.x instead. Discord.py isn't supported on 3.7 due to asyncio not supporting it. Remember to add Python to PATH!

Install an older version of PY to run discord!



来源:https://stackoverflow.com/questions/50848070/i-installed-a-module-called-discord-and-when-using-import-discord-i-get-the-er

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!