-2
我有一个小问题,我的Discord bot是用Python编写的,而且我不断收到错误。这是我的机器人的代码:''模块“PIP安装期间在Python3.x中找不到”'找不到''
import discord
import asyncio
client = discord.Client()
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!test'):
await client.send_message(message.channel, 'Calculating messages...')
client.run('You arent gonna get my token =D')
当我运行这个错误出现:
Traceback (most recent call last):
File "C:\Users\DELL\Documents\Testing\discordbt.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
我真的不知道该怎么办,我所做的是以下的CMD命令:
pip install discord.py
pip install asyncio
这一切,我确信没有错误安装的模块,而他们做到了,什么都在涨而这样的,我知道你需要其他的一些“节目”和我已经安装了以下程序:Python 3.6.3 64x
和Python 3.7.0a2 64x
我的电脑来自64x位架构,因此它完全匹配。
[Discord PIP Install Error]可能的重复(https://stackoverflow.com/questions/46133128/discord-pip-install-error) – thatrockbottomprogrammer
您确定您的脚本使用了正确的解释器吗?当你安装了几个Python dists时,看到“ModuleNotFound”很常见。 – lotrus28
Interpeter? DIST?向我解释:) @ lotrus28 – DeadlyFirex