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

Unable to install androguard on Asahi Linux #1048

Closed
jvoisin opened this issue May 15, 2024 · 4 comments
Closed

Unable to install androguard on Asahi Linux #1048

jvoisin opened this issue May 15, 2024 · 4 comments

Comments

@jvoisin
Copy link

jvoisin commented May 15, 2024

$ cat /etc/fedora-release
Fedora Asahi Remix release 40 (Forty)
$ uname -a
Linux chernabog 6.8.8-400.asahi.fc40.aarch64+16k #1 SMP PREEMPT_DYNAMIC Tue Apr 30 02:30:35 UTC 2024 aarch64 GNU/Linux
$ source ./venv/bin/activate
$ pip install -U androguard
Collecting androguard
  Using cached androguard-4.1.1-py3-none-any.whl.metadata (5.1 kB)
Collecting PyQt5 (from androguard)
  Using cached PyQt5-5.15.10.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "/home/jvoisin/Downloads/venv/lib64/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/jvoisin/Downloads/venv/lib64/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/jvoisin/Downloads/venv/lib64/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ia9l28pj/overlay/lib/python3.12/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ia9l28pj/overlay/lib/python3.12/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-ia9l28pj/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 603, in setup
          self.update(tool)
        File "/tmp/pip-install-80lb7vm7/pyqt5_808a44c62ab2432da57535ea0d596dea/project.py", line 165, in update
          raise UserException(
      sipbuild.exceptions.UserException
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[1]
$
@ehrenb
Copy link
Contributor

ehrenb commented May 15, 2024

I don't have the environment to reproduce this. I'm pretty sure this is because there is no matching .whl for PyQt5 (v5.15.10) (https://pypi.org/project/PyQt5/#files) for your platform (Linux ARM).

@jvoisin
Copy link
Author

jvoisin commented May 15, 2024

Is there a way to only install the CLI (and thus to not have Qt as a dependency)?

@ehrenb
Copy link
Contributor

ehrenb commented May 15, 2024

Is there a way to only install the CLI (and thus to not have Qt as a dependency)?

There is no real supported way to do this, but the following hack may work. You should be able to download a release zip (https://github.com/androguard/androguard/releases/download/v4.1.1/androguard-4.1.1.tar.gz), edit pyproject.toml and comment out PyQt5 and PyQt5-Qt5 . It depends what functionality you're trying to invoke from the CLI, for example androguard cg will likely not work, but other commands may work.

@erev0s
Copy link
Collaborator

erev0s commented May 15, 2024

hi @jvoisin , yes as @ehrenb also said you can clone the repo and simply remote the PyQt dependency and then install it. PyQt is required when using the show flag in the call graph, so unless you want to use that, then you dont need it.

PyQt has caused quite some trouble lately with these issues, maybe we can remove it as a dependency and inform the user to install it when the corresponding flag is used, or find an alternative that does not require it at all.

@erev0s erev0s closed this as completed May 24, 2024
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

3 participants