(Python: discord.py) ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly

I had a similar problem with a package with yarl, multidict dependencies. To fix it, I just upgraded my pip:

pip install --upgrade pip
pip install discord

UPDATE JAN 8, 2021: Discord.py v1.6 has been released, changelogs include a bump in the dependencies for building wheels

Old message below

If you want to stay on 3.9:

  • Install Devon's personal builds of aiohttp, multidict, yarl, and PyNaCl (https://github.com/Rapptz/discord.py/issues/5984#issuecomment-727684359), e.g.: py -3.9 -m pip install --upgrade discord.py[voice] --extra-index-url https://gorialis.github.io/pip/
  • Install the Micosoft Visual C++ standalone compilers (https://wiki.python.org/moin/WindowsCompilers) and try to install discord.py in a Native Tools Command Prompt
  • Install from the latest development version of discord.py on the master branch (https://github.com/Rapptz/discord.py#installing), e.g.: py -3.9 -m pip install --upgrade "discord.py[voice] @ git+git://github.com/Rapptz/discord.py.git"
  • Install multidict and yarl from precompiled wheels on https://www.lfd.uci.edu/~gohlke/pythonlibs/ (note, PyNaCl for voice support is not supplied there)
  • Install the latest versions of discord.py's dependencies and install discord.py without dependencies, e.g.: py -3.9 -m pip install --upgrade aiohttp pynacl py -3.9 -m pip install --upgrade discord.py --no-dependencies
  • Use Python 3.8, for which prebuilt wheels are available for the dependency versions discord.py v1.5.1 uses
  • Wait for discord.py v1.6.0 to be released(RELEASED JAN 8 2021)

Up to date as of January 8, 2021


I also had the exact same issue today, since i downloaded node.js and it updated my python 8 to python 9 and i had to reinstall all of my moduels including dpy.

The solution is to follow what it says

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

https://visualstudio.microsoft.com/visual-cpp-build-tools/