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

JOSS Review: installation #8

Open
marcocamma opened this issue Jan 6, 2025 · 2 comments
Open

JOSS Review: installation #8

marcocamma opened this issue Jan 6, 2025 · 2 comments

Comments

@marcocamma
Copy link

marcocamma commented Jan 6, 2025

Installation from github fails (on ubuntu 22.04 machine), see terminal output at the end of this entry

Also, it would be nice do suggest to create a venv environment

python -m venv /path/to/new/virtual/environment
source /path/to/new/virtual/environment/bin/activate
cammarat@lapcammarata:~/linux$ pip install git+https://github.com/CEA-MetroCarac/cdsaxs.git
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/CEA-MetroCarac/cdsaxs.git
  Cloning https://github.com/CEA-MetroCarac/cdsaxs.git to /tmp/pip-req-build-pztj11e0
  Running command git clone --filter=blob:none --quiet https://github.com/CEA-MetroCarac/cdsaxs.git /tmp/pip-req-build-pztj11e0
  Resolved https://github.com/CEA-MetroCarac/cdsaxs.git to commit d2cfef280e9cf21a3451ba61a41b9ea8e1271f93
  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
  ╰─> [14 lines of output]
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-hz6ksjiz/overlay/local/lib/python3.10/dist-packages/hatchling/build.py", line 117, in prepare_metadata_for_build_wheel
          f.write(builder.config.core_metadata_constructor(builder.metadata))
        File "/tmp/pip-build-env-hz6ksjiz/overlay/local/lib/python3.10/dist-packages/hatchling/metadata/spec.py", line 546, in construct_metadata_file_2_4
          if metadata.core.license:
        File "/tmp/pip-build-env-hz6ksjiz/overlay/local/lib/python3.10/dist-packages/hatchling/metadata/core.py", line 677, in license
          from packaging.licenses import canonicalize_license_expression
      ModuleNotFoundError: No module named 'packaging.licenses'
      [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.
@matbryan52
Copy link
Contributor

Thank you @marcocamma for the time spent reviewing. I definitely agree that encouraging a venv would be a good addition to the documentation.

However, I believe the installation issue you are having is out-of-scope for cdsaxs, and is due to the test install using a system python with a version of pip which doesn't quite properly isolate its build environment. I was able to reproduce the issue on a VM with system-packaged python==3.10.12 and pip==22.0.2, but creating a venv or otherwise upgrading the system pip to version 22.3.0 or later allows this package to install normally. I wouldn't be surprised if this issue (fixed in this PR pypa/pip#6264 in pip 22.3.0) is related.

@mrhxszo
Copy link
Collaborator

mrhxszo commented Jan 20, 2025

I've added instructions to run the library using venv in both Github and sphinx generated documentation. Thank you for your feedback.

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