![]() |
Discord Bot - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Discord Bot (/thread-6076.html) |
Discord Bot - Arbys - Nov-05-2017 Hi. I have tried to install discord.py, through pip install discord.py in command promp. After installing and writing simple python discord bot code I tried to run it and it says no module named discord. Any ideas how to fix this? I am running python 3.5 and I have already tried reinstalling python and discord.py. Thanks RE: Discord Bot - Larz60+ - Nov-05-2017 you probably installed to a different version of python try pip -V to find out which version is in your path. After getting results, Is this the version you wanted to install RE: Discord Bot - snippsat - Nov-05-2017 C:\Python35\Scripts λ pip -V pip 9.0.1 from c:\python35\lib\site-packages (python 3.5) C:\Python35\Scripts λ pip install -U discord.py Collecting discord.py Downloading discord.py-0.16.12.tar.gz (414kB) 100% |################################| 419kB 1.1MB/s Collecting aiohttp<1.1.0,>=1.0.0 (from discord.py) Downloading aiohttp-1.0.5-cp35-cp35m-win32.whl (132kB) 100% |################################| 133kB 1.9MB/s Collecting websockets<4.0,>=3.1 (from discord.py) Downloading websockets-3.4-cp35-cp35m-win32.whl (50kB) 100% |################################| 51kB 1.8MB/s Requirement already up-to-date: chardet in c:\python35\lib\site-packages (from aiohttp<1.1.0,>=1.0.0->discord.py) Collecting multidict>=2.0 (from aiohttp<1.1.0,>=1.0.0->discord.py) Downloading multidict-3.3.2-cp35-cp35m-win32.whl (170kB) 100% |################################| 174kB 1.9MB/s Collecting async-timeout (from aiohttp<1.1.0,>=1.0.0->discord.py) Downloading async_timeout-2.0.0-py3-none-any.whl Building wheels for collected packages: discord.py Running setup.py bdist_wheel for discord.py ... done Stored in directory: C:\Users\Tom\AppData\Local\pip\Cache\wheels\64\75\26\d222074ecf19644df920bd43ad578156fcb00e515efd1cd164 Successfully built discord.py Installing collected packages: multidict, async-timeout, aiohttp, websockets, discord.py Successfully installed aiohttp-1.0.5 async-timeout-2.0.0 discord.py-0.16.12 multidict-3.3.2 websockets-3.4 C:\Python35\Scripts λ cd .. C:\Python35 λ python Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import discord >>> discord.__version__ '0.16.12'So here i did go in Scripts folder of 35,to make sure that it install to 3.5. If you follow Python 3.6 and pip installation under Windows. Then 3.6 will be added to OS Path. From anywhere in cmd ,it will use python and pip of 3.6.Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. Med enerett. C:\Windows\System32>cd\ C:\>pip -V pip 9.0.1 from c:\python36\lib\site-packages (python 3.6) C:\>pip install -U discord.py Collecting discord.py Using cached discord.py-0.16.12.tar.gz Collecting aiohttp<1.1.0,>=1.0.0 (from discord.py) Downloading aiohttp-1.0.5.tar.gz (499kB) 100% |████████████████████████████████| 501kB 1.4MB/s Collecting websockets<4.0,>=3.1 (from discord.py) Downloading websockets-3.4-cp36-cp36m-win32.whl (50kB) 100% |████████████████████████████████| 51kB 2.1MB/s Requirement already up-to-date: chardet in c:\python36\lib\site-packages (from aiohttp<1.1.0,>=1.0.0->discord.py) Collecting multidict>=2.0 (from aiohttp<1.1.0,>=1.0.0->discord.py) Downloading multidict-3.3.2-cp36-cp36m-win32.whl (171kB) 100% |████████████████████████████████| 174kB 2.1MB/s Collecting async_timeout (from aiohttp<1.1.0,>=1.0.0->discord.py) Using cached async_timeout-2.0.0-py3-none-any.whl Building wheels for collected packages: discord.py, aiohttp Running setup.py bdist_wheel for discord.py ... done Stored in directory: C:\Users\Tom\AppData\Local\pip\Cache\wheels\64\75\26\d222074ecf19644df920bd43ad578156fcb00e515efd1cd164 Running setup.py bdist_wheel for aiohttp ... done Stored in directory: C:\Users\Tom\AppData\Local\pip\Cache\wheels\3a\80\0c\1d14c58277f1badb06010f07e1fbf879d51c7ad31b37d8a743 Successfully built discord.py aiohttp Installing collected packages: multidict, async-timeout, aiohttp, websockets, discord.py Successfully installed aiohttp-1.0.5 async-timeout-2.0.0 discord.py-0.16.12 multidict-3.3.2 websockets-3.4 C:\>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import discord >>> discord.__version__ '0.16.12' >>> RE: Discord Bot - Arbys - Nov-05-2017 Well, i tried to reinstall, in command promp it says this: Quote:>>> import discordbut when i open .py with "import discord" it still says: >>> no module named 'discord' and also: Quote:C:\Users\Adam>pip -V RE: Discord Bot - snippsat - Nov-05-2017 If you type python in cmd ,dos Python 3.5 start?If 3.5 start it's then is python my_script.py ,and it will use 3.5.What a editor use can be different,and sometime need to be setup to use right Python version. RE: Discord Bot - Arbys - Nov-05-2017 Yes, if I type python in cmd, python 3.5 starts. And I am working in Visual Studio 2017 RE: Discord Bot - snippsat - Nov-05-2017 Selecting and installing Python interpreters in Visual Studio. I would say VS code is better choice for Python,my quick review. RE: Discord Bot - Gamer - Nov-06-2017 Hi, I have problem with; ModuleNotFoundError: No module named 'discord' Plz if anyone know tell me... |