meeb / tubesync

Syncs YouTube channels and playlists to a locally hosted media server
GNU Affero General Public License v3.0
1.87k stars 119 forks source link

Can't Build Application in Ubuntu 24.04 #534

Open Ashkaan opened 1 month ago

Ashkaan commented 1 month ago

Step 3 of the Instructions: Set up the environment with pipenv install

Output: `Creating a virtualenv for this project... Pipfile: /home/user/tubesync/tubesync/Pipfile Using default python from /usr/bin/python3 (3.12.3) to create virtualenv... ⠼ Creating virtual environment...created virtual environment CPython3.12.3.final.0-64 in 268ms creator CPython3Posix(dest=/home/user/.local/share/virtualenvs/tubesync-X_k7L6sf, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/user/.local/share/virtualenv) added seed packages: pip==24.0 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! Virtualenv location: /home/user/.local/share/virtualenvs/tubesync-X_k7L6sf Pipfile.lock not found, creating... Locking [packages] dependencies... Building requirements... Resolving dependencies... ✘ Locking Failed! ⠹ Locking...False ERROR:pip.subprocessor:Getting requirements to build wheel exited with 1 ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/resolver.py", line 645, in _main

ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/resolver.py", line 612, in resolve_packages ResolutionFailure: results, resolver = resolve(

ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/resolver.py", line 592, in resolve ResolutionFailure: return resolve_deps(

ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 918, in resolve_deps ResolutionFailure: results, hashes, internal_resolver = actually_resolve_deps(

ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 691, in actually_resolve_deps

ResolutionFailure: File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 448, in resolve ResolutionFailure: raise ResolutionFailure(message=str(e)) [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies. You can use $ pipenv run pip install to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv. Hint: try $ pipenv lock --pre if it is a pre-release dependency. ERROR: Getting requirements to build wheel exited with 1

Traceback (most recent call last): File "/usr/bin/pipenv", line 8, in sys.exit(cli()) ^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1157, in call return self.main(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/cli/options.py", line 58, in main return super().main(args, kwargs, windows_expand_args=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 783, in invoke return __callback(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 783, in invoke return __callback(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/cli/command.py", line 209, in install do_install( File "/usr/lib/python3/dist-packages/pipenv/routines/install.py", line 164, in do_install do_init( File "/usr/lib/python3/dist-packages/pipenv/routines/install.py", line 672, in do_init do_lock( File "/usr/lib/python3/dist-packages/pipenv/routines/lock.py", line 65, in do_lock venv_resolve_deps( File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 859, in venv_resolve_deps c = resolve(cmd, st, project=project) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 728, in resolve raise RuntimeError("Failed to lock Pipfile.lock!") RuntimeError: Failed to lock Pipfile.lock!`

meeb commented 1 month ago

There's not enough information here to find the root cause of the failure. This is the top level "pipenv failed to install" error and not the actual error message on what library failed to install.

However, this is almost certainly due to not having some required dev packages installed (for example https://github.com/meeb/tubesync/blob/main/Dockerfile#L100). Python packages like libsass require a bunch of C dev packages to be installed or they fail.

Try running pipenv install with --verbose to see if you can get the actual error message, if it's about some C module failing to compile you'll need to install whatever the missing required packages are.

Unless you're trying to set up a local development environment to make modifications or similar it would be highly advisable to run tubesync in the supplied container, it's a bundle of quite a few services and can be complex to run stand-alone.

Ashkaan commented 4 weeks ago

Ok, I got to Step 5, but got this. Is there a list of dependencies (and the command to install them) that you can share?

./manage.py migrate Traceback (most recent call last): File "/home/user/tubesync/tubesync/tubesync/./manage.py", line 18, in main() File "/home/user/tubesync/tubesync/tubesync/./manage.py", line 14, in main execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 442, in execute_from_command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 416, in execute django.setup() File "/usr/lib/python3/dist-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/django/apps/config.py", line 193, in create import_module(entry) File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1324, in _find_and_load_unlocked ModuleNotFoundError: No module named 'background_task'

meeb commented 4 weeks ago

That would imply that django-background-tasks is not installed. Try pipenv install --verbose django-background-tasks and see what happens. If you get a "package not found" or similar error then it's likely the pinned version of django-background-tasks isn't available for whatever version of Python you're running.