imayhaveborkedit / discord-ext-voice-recv

Voice receive extension package for discord.py
https://pypi.org/project/discord-ext-voice-recv/
MIT License
117 stars 18 forks source link

cannot import name 'voice_recv' from 'discord.ext' #7

Closed AnthonMS closed 8 months ago

AnthonMS commented 8 months ago

I am having a similar issue as some of the other users, but not the exact same I think. I have installed discord.py both through github and through the command they provide pip install -U "discord.py[voice]" and both give me same error as result.

C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\discord\__init__.py
PS C:\Users\User\Projects\Python\DiscOllama> python3 .\main.py
Traceback (most recent call last):
  File "C:\Users\User\Projects\Python\DiscOllama\main.py", line 7, in <module>
    from src.DiscOllama import DiscOllama
  File "C:\Users\User\Projects\Python\DiscOllama\src\DiscOllama.py", line 5, in <module>
    from discord.ext import voice_recv
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'voice_recv' from 'discord.ext' (unknown location)

I am unsure how to go about this error. Sorry for the inconvenience.

AnthonMS commented 8 months ago

Okay, that's my bad. For other people stumbling upon this. Make 100% sure that both discord.py and this extension is installed under the user with the -U option for pip and also, discord.py HAS to be installed form github, the pip install command with voice support does not work, not for this at least.

$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]

After that we can install the extension:

pip install -U discord-ext-voice-recv