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 picca from v9.0.0 tar.gz file #1068

Open
alxogm opened this issue Jul 9, 2024 · 3 comments
Open

Unable to install picca from v9.0.0 tar.gz file #1068

alxogm opened this issue Jul 9, 2024 · 3 comments

Comments

@alxogm
Copy link
Contributor

alxogm commented Jul 9, 2024

When writing the tutorial to reproduce KP6 without the bookkeeper I got the following error when trying to install the v9.0.0 version from the downloaded tar.gz file. I worked around by using pip to install such version, or by git cloning the repo and creating a branch with the v9.0.0 tag, but I think its worth to check why it couldn't be installed from the tar file. From the error it seems that to install it needs to be a git repository, but that shouldn't be required right? Any ideas? (I haven't tried in other computers than Perlmutter)

Obtaining file:///pscratch/sd/a/alxogm/desi/picca-9.0.0
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/global/homes/a/alxogm/.conda/envs/picca_v9.0.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/global/homes/a/alxogm/.conda/envs/picca_v9.0.0/lib/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 "/global/homes/a/alxogm/.conda/envs/picca_v9.0.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 458, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 12, in <module>
        File "/tmp/pip-build-env-6izu3e6y/overlay/lib/python3.12/site-packages/git/repo/base.py", line 289, in __init__
          raise InvalidGitRepositoryError(epath)
      git.exc.InvalidGitRepositoryError: /pscratch/sd/a/alxogm/desi/picca-9.0.0
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Also, this reminded me that in the past I was able to run picca without having to actually install it (with pip), just by adding the picca directories to the PATH and PYTHONPATH, that is not longer possible, I think its because of the added feature of saving the info of the version used in the log. But I wonder if this was expected or should I open another issue to fix it?

@iprafols
Copy link
Collaborator

iprafols commented Jul 9, 2024

Hi @alxogm, I have created a fix for the setup.py (PR #1069) so that this error no longer occurs.

I'm confused about the issue of running with PATH and PYTHONPATH. I can still run without installing it using this option. Can you share more details as to what is the issue?

@iprafols
Copy link
Collaborator

iprafols commented Oct 9, 2024

I guess we can close this issue? @alxogm ?

@calumgordon
Copy link

@alxogm have you tried this again after Ignasi fixed it?

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