Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Build Application in Ubuntu 24.04 #534

Open
Ashkaan opened this issue Aug 18, 2024 · 3 comments
Open

Can't Build Application in Ubuntu 24.04 #534

Ashkaan opened this issue Aug 18, 2024 · 3 comments

Comments

@Ashkaan
Copy link

Ashkaan commented Aug 18, 2024

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]: resolve_packages(
[ResolutionFailure]: File "/usr/lib/python3/dist-packages/pipenv/resolver.py", line 612, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: ^^^^^^^^
[ResolutionFailure]: File "/usr/lib/python3/dist-packages/pipenv/resolver.py", line 592, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^
[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]: ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]: File "/usr/lib/python3/dist-packages/pipenv/utils/resolver.py", line 691, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[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 <requirement_name> 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
Copy link
Owner

meeb commented Aug 19, 2024

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
Copy link
Author

Ashkaan commented Aug 21, 2024

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
Copy link
Owner

meeb commented Aug 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants