This question deals with discord.py errors caused by asyncio, but any advice on creating discord bots would be very welcome. I am more than willing to read documentation to fully understand responses, and will pursue provided articles.
Problem:
I am attempting to create a simple discord bot in python 3.9. I am new to python, and have been using pycharm to write my scripts. I found an error while attempting to run the script. Script provided here:
import discord
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('$hello'):
await message.channel.send('Hello!')
client.run('my bot token')
Error provided here:
Traceback (most recent call last):
File "C:\Users\User\py_projects\discord\scrambot_main.py", line 2, in <module>
import discord
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\__init__.py", line 20, in <module>
from .client import Client, AppInfo, ChannelPermissions
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 38, in <module>
from .state import ConnectionState
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\state.py", line 36, in <module>
from . import utils, compat
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax
Solutions I've Seen So Far:
I have seen a myriad of questions asking the same for python 3.7, and none for 3.9. This would either be because nobody else experiences the same error with python 3.9 in pycharm, or the solution is the same as in python 3.7.
I have seen many people recommending dropping to version 3.6 of python because async is a keyword in 3.7, which I want to avoid if possible. I'm fairly sure it still is a keyword in 3.9.
Some responses have said that pycharm creates virtual environments and would not have discord.py installed. This is not true in my case -- I have checked my project preferences and discord.py is in fact included and accessible by my script. More evidence is in the error message: the line causing problems is found in the discord.py directory, so the compiler must be able to access it. Right?
The problem may arise from the fact that i installed using pip install discord.py and then tried again with pip3 install discord.py. As far as I can tell, these worked as intended. There is an error if i try to use pip3 install discord or pip install discord, which I have provided. I do not know if the .py makes a difference, but if it does, i'm sure it would help to know that. The only other version of a solution i've seen is downloading the rewrite version of discord.py off github. I have not tried this yet because i want to make this version work if possible.
C:\Users\User>pip3 install discord
Collecting discord
Using cached discord-1.0.1-py3-none-any.whl (1.1 kB)
Collecting discord.py>=1.0.1
Using cached discord.py-1.5.1-py3-none-any.whl (701 kB)
Processing c:\users\user\appdata\local\pip\cache\wheels\b6\9c\bd\6b99bc6ec9dab11f3756d31fb8506d3ecf07aea58b6201f539\aiohttp-3.6.3-py3-none-any.whl
Collecting attrs>=17.3.0
Using cached attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Requirement already satisfied: chardet<4.0,>=2.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py>=1.0.1->discord) (3.0.4)
Collecting yarl<1.6.0,>=1.0
Using cached yarl-1.5.1.tar.gz (173 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting multidict<5.0,>=4.5
Using cached multidict-4.7.6.tar.gz (50 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: async-timeout<4.0,>=3.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py>=1.0.1->discord) (3.0.1)
Collecting idna>=2.0
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: yarl, multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmpib94rz6b'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-rrtk0pij\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
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/
----------------------------------------
ERROR: Failed building wheel for yarl
Building wheel for multidict (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmp_yeznrct'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-rrtk0pij\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
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/
----------------------------------------
ERROR: Failed building wheel for multidict
Failed to build yarl multidict
ERROR: Could not build wheels for yarl, multidict which use PEP 517 and cannot be installed directly
Questions:
Has anyone had success with discord bots in python 3.9?
Is something wrong with my script?
Is async a keyword in python 3.9? If so, how can i modify my program to solve this problem?
How can I fix this issue without downgrading to python 3.6? Is that the only way?
Why does pip install discord not work? What are wheels? I do not want to install C++ build tools.
Would it be easier to program a bot in C++ or JS? I don't know any JS but i am familiar with C++.
Any help with this issue would be massively appreciated. Also, as this is my first stack overflow post, please feel free to let me know if i could have done anything better in asking this question. if there's anything else i can provide to help you wonderful developers who are willing to spend their time solving noob problems like this one, please let me know.
Also, if willing and able, please provide some tips for writing discord bots. This is intended to be a small Admin bot created to test and develop my python skills. Interaction with people is the focus, not automation of any kind, although I do want to try out as many ideas as possible.
Edit:
Included PyCharm python interpreter settings.
Also had an issue with opening a new venv project and installing discord.py to it. Same wheels error as above, provided errors and other relevant windows in the image below. also not sure where to put my script file or how to make the run configuration.
the issue is with your discord.Client() you should never use that instead use
from discord.ext import commands
client = commands.Bot(prefix="ur prefix")
And you have written command in wrong way
#client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
correct way :
#client.command()
async def hello(ctx):
await ctx.send("Hello!")
Related
your texti want to download an older version of discord.py ( i already installed the recent one but i think uninstalled it ) i have to do a project for school and decided to create a discord bot because im interested in programation but now idon't know what to do pls help me
λ pip install discord.py==1.5.1
Collecting discord.py==1.5.1
Using cached discord.py-1.5.1-py3-none-any.whl (701 kB)
Collecting aiohttp\<3.7.0,\>=3.6.0
Using cached aiohttp-3.6.3-py3-none-any.whl
Requirement already satisfied: attrs\>=17.3.0 in c:\\python311\\lib\\site-packages (from aiohttp\<3.7.0,\>=3.6.0-\>discord.py==1.5.1) (22.2.0)
Collecting chardet\<4.0,\>=2.0
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting multidict\<5.0,\>=4.5
Using cached multidict-4.7.6.tar.gz (50 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting async-timeout\<4.0,\>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting yarl\<1.6.0,\>=1.0
Using cached yarl-1.5.1.tar.gz (173 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: idna\>=2.0 in c:\\python311\\lib\\site-packages (from yarl\<1.6.0,\>=1.0-\>aiohttp\<3.7.0,\>=3.6.0-\>discord.py==1.5.1) (3.4)
Building wheels for collected packages: multidict, yarl
Building wheel for multidict (pyproject.toml): started
Building wheel for multidict (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for multidict (pyproject.toml) did not run successfully.
exit code: 1
\[67 lines of output\]
**********************
* Accellerated build \*
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\\lib.win-amd64-cpython-311
creating build\\lib.win-amd64-cpython-311\\multidict
copying multidict_abc.py -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict_compat.py -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict_multidict_base.py -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict_multidict_py.py -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict\__init_\_.py -\> build\\lib.win-amd64-cpython-311\\multidict
running egg_info
writing multidict.egg-info\\PKG-INFO
writing dependency_links to multidict.egg-info\\dependency_links.txt
writing top-level names to multidict.egg-info\\top_level.txt
reading manifest file 'multidict.egg-info\\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '\*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs_build'
adding license file 'LICENSE'
writing manifest file 'multidict.egg-info\\SOURCES.txt'
C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-build-env-8h4owjef\\overlay\\Lib\\site-packages\\setuptools\\command\\build_py.py:202: SetuptoolsDeprecationWarning: Installing 'multidict.\_multilib' as data is deprecated, please list it in `packages`.
!!
############################
# Package would be ignored #
############################
Python recognizes 'multidict._multilib' as an importable package,
but it is not listed in the `packages` configuration of setuptools.
'multidict._multilib' has been automatically added to the distribution only
because it may contain data files, but this behavior is likely to change
in future versions of setuptools (and therefore is considered deprecated).
Please make sure that 'multidict._multilib' is included as a package by using
the `packages` configuration field or the proper discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" and "data files" on setuptools
documentation page.
!!
check.warn(importable)
copying multidict\__init_\_.pyi -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict_multidict.c -\> build\\lib.win-amd64-cpython-311\\multidict
copying multidict\\py.typed -\> build\\lib.win-amd64-cpython-311\\multidict
creating build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\defs.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\dict.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\istr.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\iter.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\pair_list.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
copying multidict_multilib\\views.h -\> build\\lib.win-amd64-cpython-311\\multidict_multilib
running build_ext
building 'multidict.\_multidict' extension
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/
\[end of output\]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for multidict
Building wheel for yarl (pyproject.toml): started
Building wheel for yarl (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for yarl (pyproject.toml) did not run successfully.
exit code: 1
\[38 lines of output\]
C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-build-env-2xp_gtei\\overlay\\Lib\\site-packages\\setuptools\\config\\setupcfg.py:520: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
**********************
* Accellerated build \*
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\\lib.win-amd64-cpython-311
creating build\\lib.win-amd64-cpython-311\\yarl
copying yarl_quoting.py -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl_quoting_py.py -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl_url.py -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl\__init_\_.py -\> build\\lib.win-amd64-cpython-311\\yarl
running egg_info
writing yarl.egg-info\\PKG-INFO
writing dependency_links to yarl.egg-info\\dependency_links.txt
writing requirements to yarl.egg-info\\requires.txt
writing top-level names to yarl.egg-info\\top_level.txt
reading manifest file 'yarl.egg-info\\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs_build'
adding license file 'LICENSE'
writing manifest file 'yarl.egg-info\\SOURCES.txt'
copying yarl\__init_\_.pyi -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl_quoting_c.c -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl_quoting_c.pyi -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl_quoting_c.pyx -\> build\\lib.win-amd64-cpython-311\\yarl
copying yarl\\py.typed -\> build\\lib.win-amd64-cpython-311\\yarl
running build_ext
building 'yarl.\_quoting_c' extension
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/
\[end of output\]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl, which is required to install pyproject.toml-based projects
\[notice\] A new release of pip available: 22.3.1 -\> 23.0
\[notice\] To update, run: python.exe -m pip install --upgrade pip
i tried to install an older version of discord.py but it didn't worked
i didnt tried anything because i don't know what to do to fix this
so I recently upgraded to Python 3.9 and when trying to install some libraries - specifically pip install discord - I encountered the following error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmprrfx0262'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-qj3xz8wb\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
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/
----------------------------------------
ERROR: Failed building wheel for multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmp_na_hzow'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-qj3xz8wb\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
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/
----------------------------------------
ERROR: Failed building wheel for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly
Obviously I went to the link and downloaded the build tools and then checked the C++ part but after restarting my computer, re-installing visual studio, I am still encountering the same problem. I am wondering if there is a part in the installation process that I am missing out on or if I have messed something up.
Any help appreciated.
Open up visual studio installer and select modify build tools
Go to individual components and make sure C++ 2019 Redistributable Update, C++ CMake tools for Windows, MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.27), C++ AddressSanitizer (Experimental), C++ Build Tools core features, are checked.
If not check them and select modify. If you are on an ARM or ARM64 based system, replace MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.27) with the ARM or ARM64 version.
Try to install Visual Studio: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16, and Visual Studio C++ Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/. The problem should be fixed.
Make sure you have version 14+.
I think for installing discord api you need to write the command pip install discord.py and not pip install discord
trying to download discord.py using pip install, gave me the error message in the title.
I installed using cmd and the commands py -m pip install -U discord, the cmd was also run in admin.
tried using pip, pip3, and pip3.9, all of which didnt work.
I tried uninstalling/reinstalling/upgrading (in that order) the said libraries:
pip
yarl
multidict
wheel
setuptools
versions of python that I tried (in all versions are downloaded with default settings with nothing changed):
python-3.9.0-amd64.exe
python-3.9.0.exe
I tried researching about wheels and tried installing with --no-binary :all: as well, but it gave the same error message below.
in all the iterations of what I have tried, it churned out the exact same error message without any deviation
ples help :<
Using cached discord-1.0.1-py3-none-any.whl (1.1 kB)
Collecting discord.py>=1.0.1
Using cached discord.py-1.5.1-py3-none-any.whl (701 kB)
Processing c:\users\mt\appdata\local\pip\cache\wheels\b6\9c\bd\6b99bc6ec9dab11f3756d31fb8506d3ecf07aea58b6201f539\aiohttp-3.6.3-py3-none-any.whl
Collecting attrs>=17.3.0
Using cached attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Collecting chardet<4.0,>=2.0
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting async-timeout<4.0,>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting yarl<1.6.0,>=1.0
Using cached yarl-1.5.1.tar.gz (173 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting multidict<5.0,>=4.5
Using cached multidict-4.7.6.tar.gz (50 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting idna>=2.0
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: yarl, multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mt\appdata\local\programs\python\python39\python.exe' 'c:\users\mt\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\MT\AppData\Local\Temp\tmptlhkh7zi'
cwd: C:\Users\MT\AppData\Local\Temp\pip-install-nztu4nu2\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
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/
----------------------------------------
ERROR: Failed building wheel for yarl
Building wheel for multidict (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mt\appdata\local\programs\python\python39\python.exe' 'c:\users\mt\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\MT\AppData\Local\Temp\tmpzb98brnr'
cwd: C:\Users\MT\AppData\Local\Temp\pip-install-nztu4nu2\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
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/
----------------------------------------
ERROR: Failed building wheel for multidict
Failed to build yarl multidict
ERROR: Could not build wheels for yarl, multidict 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/
Using latest versions of the libraries (instead of versions mentioned in repo) yarl, multidict, pandas for the apache superset setup on Mac M2 Apple Chip fixes this problem.
trying to download discord.py using pip install, gave me the error message in the title.
I installed using cmd and the commands py -m pip install -U discord, the cmd was also run in admin.
tried using pip, pip3, and pip3.9, all of which didnt work.
I tried uninstalling/reinstalling/upgrading (in that order) the said libraries:
pip
yarl
multidict
wheel
setuptools
versions of python that I tried (in all versions are downloaded with default settings with nothing changed):
python-3.9.0-amd64.exe
python-3.9.0.exe
I tried researching about wheels and tried installing with --no-binary :all: as well, but it gave the same error message below.
in all the iterations of what I have tried, it churned out the exact same error message without any deviation
ples help :<
Using cached discord-1.0.1-py3-none-any.whl (1.1 kB)
Collecting discord.py>=1.0.1
Using cached discord.py-1.5.1-py3-none-any.whl (701 kB)
Processing c:\users\mt\appdata\local\pip\cache\wheels\b6\9c\bd\6b99bc6ec9dab11f3756d31fb8506d3ecf07aea58b6201f539\aiohttp-3.6.3-py3-none-any.whl
Collecting attrs>=17.3.0
Using cached attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Collecting chardet<4.0,>=2.0
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting async-timeout<4.0,>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting yarl<1.6.0,>=1.0
Using cached yarl-1.5.1.tar.gz (173 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting multidict<5.0,>=4.5
Using cached multidict-4.7.6.tar.gz (50 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting idna>=2.0
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: yarl, multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mt\appdata\local\programs\python\python39\python.exe' 'c:\users\mt\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\MT\AppData\Local\Temp\tmptlhkh7zi'
cwd: C:\Users\MT\AppData\Local\Temp\pip-install-nztu4nu2\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
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/
----------------------------------------
ERROR: Failed building wheel for yarl
Building wheel for multidict (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mt\appdata\local\programs\python\python39\python.exe' 'c:\users\mt\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\MT\AppData\Local\Temp\tmpzb98brnr'
cwd: C:\Users\MT\AppData\Local\Temp\pip-install-nztu4nu2\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
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/
----------------------------------------
ERROR: Failed building wheel for multidict
Failed to build yarl multidict
ERROR: Could not build wheels for yarl, multidict 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/
Using latest versions of the libraries (instead of versions mentioned in repo) yarl, multidict, pandas for the apache superset setup on Mac M2 Apple Chip fixes this problem.
I'm also getting the same error while installing Twisted.
Here's version info:
Django : 1.9
Python : 3.5
Trying to install latest version of Django-channels
Command used : pip install channels
The error :
running build_ext
building 'twisted.test.raiser' extension error:
[WinError 2] The system cannot find the file specified
(Almost) full error message
.......pip install channels
Collecting channels
Using cached channels-1.1.8-py2.py3-none-any.whl
Collecting daphne~=1.3 (from channels)
Using cached daphne-1.3.0-py2.py3-none-any.whl
Requirement already satisfied: asgiref~=1.1 in g:\django\projectChat\venv\lib\site-packages (from channels
)
Requirement already satisfied: Django>=1.8 in g:\django\projectChat\venv\lib\site-packages (from channels)
Requirement already satisfied: autobahn>=0.18 in g:\django\projectChat\venv\lib\site-packages (from daphne
~=1.3->channels)
Collecting twisted>=17.1 (from daphne~=1.3->channels)
Using cached Twisted-17.9.0.tar.bz2
Requirement already satisfied: six in g:\django\projectChat\venv\lib\site-packages (from asgiref~=1.1->cha
nnels)
Requirement already satisfied: txaio>=2.7.0 in g:\django\projectChat\venv\lib\site-packages (from autobahn
>=0.18->daphne~=1.3->channels)
Requirement already satisfied: zope.interface>=4.0.2 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: constantly>=15.1 in g:\django\projectChat\venv\lib\site-packages (from twis
ted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: incremental>=16.10.1 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: Automat>=0.3.0 in g:\django\projectChat\venv\lib\site-packages (from twiste
d>=17.1->daphne~=1.3->channels)
Requirement already satisfied: hyperlink>=17.1.1 in g:\django\projectChat\venv\lib\site-packages (from twi
sted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: setuptools in g:\django\projectChat\venv\lib\site-packages (from zope.inter
face>=4.0.2->twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: attrs in g:\django\projectChat\venv\lib\site-packages (from Automat>=0.3.0-
>twisted>=17.1->daphne~=1.3->channels)
Installing collected packages: twisted, daphne, channels
Running setup.py install for twisted ... error
Complete output from command G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, t
okenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\setup.py';f=getattr(tokenize, 'open'
, open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Use
rs\Mike\AppData\Local\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-
headers G:\django\projectChat\venv\include\site\python3.5\twisted:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\_version.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__init__.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__main__.py -> build\lib.win-amd64-3.5\twisted
creating build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\app.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\internet.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\reactors.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\service.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\strports.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\__init__.py -> build\lib.win-amd64-3.5\twisted\application
creating build\lib.win-amd64-3.5\twisted\conch
copying src\twisted\conch\avatar.py -> build\lib.win-amd64-3.5\twisted\conch
[...]
creating build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_convenience.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_memory.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_team.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_threadworker.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\__init__.py -> build\lib.win-amd64-3.5\twisted\_threads\test
running egg_info
writing dependency_links to src\Twisted.egg-info\dependency_links.txt
writing entry points to src\Twisted.egg-info\entry_points.txt
writing src\Twisted.egg-info\PKG-INFO
writing top-level names to src\Twisted.egg-info\top_level.txt
writing requirements to src\Twisted.egg-info\requires.txt
reading manifest file 'src\Twisted.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.misc' found under directory 'src\twisted'
warning: no previously-included files matching '*.bugfix' found under directory 'src\twisted'
warning: no previously-included files matching '*.doc' found under directory 'src\twisted'
warning: no previously-included files matching '*.feature' found under directory 'src\twisted'
warning: no previously-included files matching '*.removal' found under directory 'src\twisted'
warning: no previously-included files matching 'NEWS' found under directory 'src\twisted'
warning: no previously-included files matching 'README' found under directory 'src\twisted'
warning: no previously-included files matching 'newsfragments' found under directory 'src\twisted'
warning: no previously-included files found matching 'src\twisted\topfiles\CREDITS'
warning: no previously-included files found matching 'src\twisted\topfiles\ChangeLog.Old'
warning: no previously-included files found matching 'pyproject.toml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching 'bin'
no previously-included directories found matching 'admin'
no previously-included directories found matching '.travis'
warning: no previously-included files found matching 'docs\historic\2003'
warning: no previously-included files matching '*' found under directory 'docs\historic\2003'
writing manifest file 'src\Twisted.egg-info\SOURCES.txt'
copying src\twisted\python\_sendmsg.c -> build\lib.win-amd64-3.5\twisted\python
copying src\twisted\python\twisted-completion.zsh -> build\lib.win-amd64-3.5\twisted\python
creating build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\common.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\index.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\summary.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\test\cert.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\key.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.c -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.pyx -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\server.pem -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\internet\iocpreactor\build.bat -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
copying src\twisted\internet\iocpreactor\notes.txt -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
creating build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\acceptex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\
iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\connectex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.c -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.pyx -> build\lib.win-amd64-3.5\twisted\internet\iocpreact
or\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.c -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.h -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsarecv.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsasend.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\test\_awaittests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
copying src\twisted\internet\test\_yieldfromtests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
creating build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\chain.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\not-a-certificate -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing1.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2-duplicate.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.5\twisted\mail\test
copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-amd64-3.5\twisted\python\test
copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-3.5\twisted\words\im
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.5\twisted\words\xish
running build_ext
building 'twisted.test.raiser' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Us
ers\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f
.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Mike\AppData\Loca
l\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-headers G:\django\projectChat\venv\include\site\python3.5\twisted" failed with error code 1 in C:\Users\Mike\AppData\Local\Tem
p\pip-build-ngnwgsvg\twisted\
I don't know what i'm missing, could someone help me please, thanks.
You need a working C compiler to install Twisted on platforms for which wheels are not provided. There is no Python 3.5 wheel on PyPI for Twisted (at this time). So you need a working C compiler.
Follow these instructions for installing VS2015 to get a working C compiler so Twisted can build the necessary extension modules and install successfully.
The problem is not regarding the need for Visual C++ 14.0 or whatsoever. It is concerned with the installation of Twisted. I was able to fix this problem after trying for weeks together.
To install the correct version of Twisted visit this link. (Found this on a similar question's answer, I'm not sure of the writer to give rightful credits).
The above-mentioned link displays several versions of Twisted. You should download the one corresponding to your python version. For instance, if your python version is 3.5, you should proceed with downloading cp35m-win32.whl (For Windows only) and so forth.
Further, open Command prompt, go to the downloaded path activate your virtual environment and pip install the downloaded file.
This shall fix your issue.
I had a similar problem... I was only able to fix it by downloading Visual Studio Build tools and installing the Visual C++ Build Tools, Windows 10 SDK, and VC++ 2015.3 v14
Microsoft Visual C++ is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/