Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.11k stars 2.35k forks source link

[Can't get dependencys (pynacl) - fixed] Bot now won’t start #2207

Closed ghost closed 3 years ago

ghost commented 3 years ago

Please tick all applicable boxes.

Which version are you using?

What type of issue are you creating?


Description of issue

I tried to install the bot with the tutorial for Debian, because I use armbian for my Odroid N2 SingleboardComputer. Everything went fine until the update of the requirements. I got stuck with the pynacl.

Here is my output of the Terminal:

kuro@odroidn2:~/MusicBot$ sudo -H python3.7 -m pip install --upgrade -r requirements.txt
Collecting pynacl==1.2.1
  Downloading PyNaCl-1.2.1.tar.gz (3.3 MB)
     |████████████████████████████████| 3.3 MB 4.4 MB/s
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.7 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yoz8z_f  t/pynacl_e9635642ee2c4e11aac736f26c5de7d5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yoz8z_ft/pynacl_e9635642ee2c4e11aa  c736f26c5de7d5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.Str  ingIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exe  c(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-h4c5r7al
         cwd: /tmp/pip-install-yoz8z_ft/pynacl_e9635642ee2c4e11aac736f26c5de7d5/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b  261f/PyNaCl-1.2.1.tar.gz#sha256=e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9 (from https://pypi.org/si  mple/pynacl/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pynacl==1.2.1 (from versions: 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0  .2.3, 0.3.0, 1.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.4.0)
ERROR: No matching distribution found for pynacl==1.2.1

kuro@odroidn2:~/MusicBot$ ./run.py
[INFO] launcher: Starting sanity checks
[INFO] launcher: Checking for Python 3.5+
[INFO] launcher: Checking console encoding
[INFO] launcher: Ensuring we're in the right environment
[INFO] launcher: Required checks passed.
[INFO] launcher: Optional checks passed.
[ERROR] launcher: Error starting bot
Traceback (most recent call last):
  File "./run.py", line 367, in main
    from musicbot import MusicBot
  File "/home/kuro/MusicBot/musicbot/__init__.py", line 7, in <module>
    from .utils import _get_variable
  File "/home/kuro/MusicBot/musicbot/utils.py", line 3, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'
[INFO] launcher: Attempting to install dependencies...
Defaulting to user installation because normal site-packages is not writeable
Collecting pynacl==1.2.1
  Downloading PyNaCl-1.2.1.tar.gz (3.3 MB)
     |████████████████████████████████| 3.3 MB 3.1 MB/s
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qw7uiay8/pynacl_5719095aa1a34b8695427475698eafd5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qw7uiay8/pynacl_5719095aa1a34b8695427475698eafd5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4wmqi49d
         cwd: /tmp/pip-install-qw7uiay8/pynacl_5719095aa1a34b8695427475698eafd5/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz#sha256=e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9 (from https://pypi.org/simple/pynacl/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pynacl==1.2.1 (from versions: 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 1.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.4.0)
ERROR: No matching distribution found for pynacl==1.2.1

[CRITICAL] launcher: You may need to use sudo to install dependencies.

[INFO] launcher: All done.

Steps to reproduce


Log file

kuro@odroidn2:~/MusicBot/logs$ nano musicbot.log
  GNU nano 3.2                                           musicbot.log

[48.087596893] 2021-05-06 14:49:37,479 - INFO - launcher: Starting sanity checks
[48.618078232] 2021-05-06 14:49:37,480 - INFO - launcher: Checking for Python 3.5+
[48.778295517] 2021-05-06 14:49:37,480 - INFO - launcher: Checking console encoding
[48.917055130] 2021-05-06 14:49:37,480 - INFO - launcher: Ensuring we're in the right environment
[50.283432007] 2021-05-06 14:49:37,481 - INFO - launcher: Required checks passed.
[50.526618958] 2021-05-06 14:49:37,481 - INFO - launcher: Optional checks passed.

######################### PRE-RUN SANITY CHECKS PASSED #########################

[108.642578125] launcher-ERROR: Error starting bot
Traceback (most recent call last):
  File "./run.py", line 367, in main
    from musicbot import MusicBot
  File "/home/kuro/MusicBot/musicbot/__init__.py", line 7, in <module>
    from .utils import _get_variable
  File "/home/kuro/MusicBot/musicbot/utils.py", line 3, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'
[109.813928604] launcher-INFO: Attempting to install dependencies...
[5499.794960022] launcher-CRITICAL: You may need to use sudo to install dependencies.
[5500.350713730] launcher-INFO: All done.
AutumnClove commented 3 years ago

Change the requirements.txt file so that it looks like this:

pynacl
discord.py[voice]
pip
youtube_dl
colorlog

Then run update.bat(if your on windows, if not chose the appropriate update file for your system OS) once it's all up to date, then do run.bat(same note as before). Make to to press n and then y that way it doesn't reset the requirements.txt file back to the original.

Why do I need to change the requirements.txt file? Discord pushed an update that broke discord.py, it was fixed in a new version of discord.py however we haven't updated the requirements.txt file to target the latest version of discord.py with the fix.

ghost commented 3 years ago

Sry, but that didn't work either.

Here is my log.

kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$ ./update.sh
./update.sh: Zeile 9: python3.5: Kommando nicht gefunden.
./update.sh: Zeile 10: python3.6: Kommando nicht gefunden.
Starting...
Passed Git checks...
You have modified files that are tracked by Git (e.g the bot's source files).
Should we try resetting the repo? You will lose local modifications. (y/n): n
OK, skipping bot update. Do you still want to update dependencies? (y/n): y
Attempting to update dependencies...
Collecting pynacl (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-iv9ovqex --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
  Collecting setuptools>=40.8.0
    Using cached https://files.pythonhosted.org/packages/11/1b/7012b145cb228aed20f9b2b8b259df49e7963d900799ea44791f54d06ab9/setuptools-56.1.0-py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting cffi>=1.4.1
    Using cached https://files.pythonhosted.org/packages/a8/20/025f59f929bbcaa579704f443a438135918484fffaacfaddba776b374563/cffi-1.14.5.tar.gz
  Collecting pycparser (from cffi>=1.4.1)
    Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
  Building wheels for collected packages: cffi
    Running setup.py bdist_wheel for cffi: started
    Running setup.py bdist_wheel for cffi: finished with status 'error'
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mqf61ono/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-f2swoe77 --python-tag cp37:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'bdist_wheel'

    ----------------------------------------
    Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
    Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mqf61ono/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-i9v7dt62/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-iv9ovqex --compile:
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.7
      creating build/lib.linux-aarch64-3.7/cffi
      copying cffi/verifier.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/recompiler.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/model.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/lock.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/error.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cparser.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/commontypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/api.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/__init__.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_embedding.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.7/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-aarch64-3.7
      creating build/temp.linux-aarch64-3.7/c
      aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.7/c/_cffi_backend.o
      c/_cffi_backend.c:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
       #include <Python.h>
                ^~~~~~~~~~
      compilation terminated.
      error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

      ----------------------------------------
  Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mqf61ono/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-i9v7dt62/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-iv9ovqex --compile" failed with error code 1 in /tmp/pip-install-mqf61ono/cffi/

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-iv9ovqex --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None
Traceback (most recent call last):
  File "update.py", line 17, in update_deps
    subprocess.check_call('"{}" -m pip install --no-warn-script-location --user -U -r requirements.txt'.format(sys.executable), shell=True)
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '"/usr/bin/python3" -m pip install --no-warn-script-location --user -U -r requirements.txt' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "update.py", line 76, in <module>
    main()
  File "update.py", line 59, in main
    update_deps()
  File "update.py", line 19, in update_deps
    raise OSError("Could not update dependencies. You will need to run '\"{0}\" -m pip install -U -r requirements.txt' yourself.".format(sys.executable))
OSError: Could not update dependencies. You will need to run '"/usr/bin/python3" -m pip install -U -r requirements.txt' yourself.
kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$ ./run.sh
./run.sh: Zeile 9: python3.5: Kommando nicht gefunden.
./run.sh: Zeile 10: python3.6: Kommando nicht gefunden.
[INFO] launcher: Starting sanity checks
[INFO] launcher: Checking for Python 3.5+
[INFO] launcher: Checking console encoding
[INFO] launcher: Ensuring we're in the right environment
[INFO] launcher: Required checks passed.
[INFO] launcher: Optional checks passed.
[ERROR] launcher: Error starting bot
Traceback (most recent call last):
  File "run.py", line 367, in main
    from musicbot import MusicBot
  File "/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot/musicbot/__init__.py", line 7, in <module>
    from .utils import _get_variable
  File "/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot/musicbot/utils.py", line 3, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'
[INFO] launcher: Attempting to install dependencies...
Collecting pynacl (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-r5hxdf_4 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
  Collecting setuptools>=40.8.0
    Using cached https://files.pythonhosted.org/packages/11/1b/7012b145cb228aed20f9b2b8b259df49e7963d900799ea44791f54d06ab9/setuptools-56.1.0-py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting cffi>=1.4.1
    Using cached https://files.pythonhosted.org/packages/a8/20/025f59f929bbcaa579704f443a438135918484fffaacfaddba776b374563/cffi-1.14.5.tar.gz
  Collecting pycparser (from cffi>=1.4.1)
    Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
  Building wheels for collected packages: cffi
    Running setup.py bdist_wheel for cffi: started
    Running setup.py bdist_wheel for cffi: finished with status 'error'
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6w4vzlyz/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ekvdrvvb --python-tag cp37:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'bdist_wheel'

    ----------------------------------------
    Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
    Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6w4vzlyz/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5cp2n9ef/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-r5hxdf_4 --compile:
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.7
      creating build/lib.linux-aarch64-3.7/cffi
      copying cffi/verifier.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/recompiler.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/model.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/lock.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/error.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cparser.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/commontypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/api.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/__init__.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_embedding.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.7/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-aarch64-3.7
      creating build/temp.linux-aarch64-3.7/c
      aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.7/c/_cffi_backend.o
      c/_cffi_backend.c:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
       #include <Python.h>
                ^~~~~~~~~~
      compilation terminated.
      error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

      ----------------------------------------
  Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6w4vzlyz/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5cp2n9ef/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-r5hxdf_4 --compile" failed with error code 1 in /tmp/pip-install-6w4vzlyz/cffi/

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-r5hxdf_4 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None

[CRITICAL] launcher: You may need to use sudo to install dependencies.

[INFO] launcher: All done.
kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$
AutumnClove commented 3 years ago

Can you try doing sudo python3 -m pip install -U -r requirements.txt ?

ghost commented 3 years ago

I did that already. Same result

kurolinlin@odroidn2:~$ cd /srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot
kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$ sudo python3 -m pip install -U -r requirements.txt
[sudo] Passwort für kurolinlin:
Collecting pynacl (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gvtvlx6r --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
  Collecting setuptools>=40.8.0
    Using cached https://files.pythonhosted.org/packages/11/1b/7012b145cb228aed20f9b2b8b259df49e7963d900799ea44791f54d06ab9/setuptools-56.1.0-py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting cffi>=1.4.1
    Using cached https://files.pythonhosted.org/packages/a8/20/025f59f929bbcaa579704f443a438135918484fffaacfaddba776b374563/cffi-1.14.5.tar.gz
  Collecting pycparser (from cffi>=1.4.1)
    Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
  Building wheels for collected packages: cffi
    Running setup.py bdist_wheel for cffi: started
    Running setup.py bdist_wheel for cffi: finished with status 'error'
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-31lhkw_a/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-niou6efx --python-tag cp37:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'bdist_wheel'

    ----------------------------------------
    Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
    Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-31lhkw_a/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-08jq6k8e/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-gvtvlx6r --compile:
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.7
      creating build/lib.linux-aarch64-3.7/cffi
      copying cffi/verifier.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/recompiler.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/model.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/lock.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/error.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cparser.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/commontypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/api.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/__init__.py -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_embedding.h -> build/lib.linux-aarch64-3.7/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.7/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-aarch64-3.7
      creating build/temp.linux-aarch64-3.7/c
      aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.7/c/_cffi_backend.o
      c/_cffi_backend.c:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
       #include <Python.h>
                ^~~~~~~~~~
      compilation terminated.
      error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

      ----------------------------------------
  Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-31lhkw_a/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-08jq6k8e/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-gvtvlx6r --compile" failed with error code 1 in /tmp/pip-install-31lhkw_a/cffi/

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gvtvlx6r --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None
kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$
DestinyofYeet commented 3 years ago

Try the two following things:

If this doesn't help try:

ghost commented 3 years ago

"sudo apt install python3-dev" fixed it. Thank you for your patience.

ghost commented 3 years ago

OK Wrong guess. It's not working. But I'm one step closer. What worked ist, that I could install all dependencies. But now the Bot won't start. I don't know what to do now.

kurolinlin@odroidn2:/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot$ ./run.sh
./run.sh: Zeile 9: python3.5: Kommando nicht gefunden.
./run.sh: Zeile 10: python3.6: Kommando nicht gefunden.
[INFO] launcher: Starting sanity checks
[INFO] launcher: Checking for Python 3.5+
[INFO] launcher: Checking console encoding
[INFO] launcher: Ensuring we're in the right environment
[INFO] launcher: Required checks passed.
[INFO] launcher: Optional checks passed.
[ERROR] launcher: Error starting bot
Traceback (most recent call last):
  File "run.py", line 367, in main
    from musicbot import MusicBot
  File "/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot/musicbot/__init__.py", line 74, in <module>
    from .bot import MusicBot
  File "/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot/musicbot/bot.py", line 31, in <module>
    from .player import MusicPlayer
  File "/srv/dev-disk-by-uuid-7C9EB4AF9EB462F6/MusicBot/musicbot/player.py", line 17, in <module>
    from websockets.exceptions import InvalidState
ModuleNotFoundError: No module named 'websockets'
[INFO] launcher: Attempting to install dependencies...
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pynacl in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 1)) (1.4.0)
Requirement already satisfied: discord.py in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 2)) (1.7.2)
Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 3)) (21.1.1)
Requirement already satisfied: youtube_dl in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 4)) (2021.4.26)
Requirement already satisfied: colorlog in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 5)) (5.0.1)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from pynacl->-r requirements.txt (line 1)) (1.14.5)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pynacl->-r requirements.txt (line 1)) (1.12.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.4.1->pynacl->-r requirements.txt (line 1)) (2.20)
Requirement already satisfied: aiohttp<3.8.0,>=3.6.0 in /usr/local/lib/python3.7/dist-packages (from discord.py->-r requirements.txt (line 2)) (3.7.4.post0)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (21.2.0)
Requirement already satisfied: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (3.0.1)
Requirement already satisfied: chardet<5.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: typing-extensions>=3.6.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (3.10.0.0)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (1.6.3)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (5.1.0)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp<3.8.0,>=3.6.0->discord.py->-r requirements.txt (line 2)) (2.6)

[INFO] launcher: Ok lets hope it worked

[INFO] launcher: All done.
DestinyofYeet commented 3 years ago

Run a python3.7 -m pip install websockets

ghost commented 3 years ago

Now it works. The bot is up and running.

Many thanks to everyone.

Again, I feel realy sorry to ask for every bit for help. I do feel comfortable in Linux for years, but I don't know python well. And I don't wantet to overload my little SBC Mini Server with randomly installed packages, I see in some threads, which may be right.

I hope this serves as reference for others to help.

Thx again. and keep on coding