Answer the question
In order to leave comments, you need to log in
Why can't I import the pynacl module? (discord.py - ModuleNotFoundError: No module named 'pynacl')?
import discord
import pynacl
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$'):
if message.author.voice:
await message.author.voice.channel.connect()
return await message.channel.send(message.author.voice.channel)
Answer the question
In order to leave comments, you need to log in
In short, I got it. The problem was that the Windows console was "tied" to Python version 3.6.7, and all modules were installed on it, and I was working in 3.7.1, respectively, hence the error.
How I fixed it:
1. Checked python3 --version and found that the console is tied to it.
2. Removed Python version 3.6.7.
3. Faced the problem "Fatal error in launcher".
4. Deleted the Python 3.6 folder from AppData\Local\Programs\Python.
5. Updated pip and downloaded pynacl.
Ready! :D
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question