Closed Jared-Galyan closed 5 years ago
If you're using a Linux environment, have you installed the required dependencies for voice? See https://discordpy.readthedocs.io/en/rewrite/intro.html#installing.
I believe so yes
Correction the host just said it's docker, alpine
Correction the host just said it's docker, alpine
That is Linux.
I believe so yes
Why the ambiguity? Did you install them? Just check if you don't remember. If you haven't, then you need to do so.
@Harmon758 As I said it's docker, alpine. The host does all the installing
Alpine is a Linux distribution. I'm not sure what you mean, but just as you installed discord.py, you still need to install the dependencies required for voice, regardless of who installs it.
Docker does not install anything for you. Infact, the alpine
image exists almost for the express purpose of not installing anything for you (it doesn't even have mount
).
To get voice working on alpine, at the very least you need these packages:
build-base
(To give you the required compilers to build CPython extensions)libffi-dev
, libsodium-dev
(PyNaCl does not issue wheels for alpine so it will need to be built, requiring the development headers)opus-dev
(Opus is required by discord.py, and ctypes
can't find the library without its development headers on alpine, for some reason)I recommend doing it like this, assuming git is already installed:
# First, update the package database:
apk update
# Install our build dependencies and tag them as `voice-build-deps`:
apk add --virtual .voice-build-deps build-base libffi-dev libsodium-dev
# Install everything that isn't a build dependency, that we will need later:
apk add libffi libsodium opus-dev
# Install the library through git (this should successfully build and install PyNaCl):
pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
# Tell apk we no longer need the build deps:
apk del .voice-build-deps
Judging from your explanation and screenshot, your host seems to be doing part of the process for you. If you can, try to configure it to be like the above.
Your screenshot also shows PyNaCl with two dist-info
s. This should never be the case on a functioning install, so it's likely that your site-packages has been broken somehow. If your host allows it, try using a fresh environment.
Okay so. I have recently put my public bot onto a hosting rather than use my computer. And they installed the correct version of
discord.py rewrite
with the[voice]
bit at the end to install everything for voice. However when trying to connect the bot to a voice channel the console gives us this error.Even though PyNaCl is installed