23andMe / yhaplo

Identifying Y-chromosome haplogroups in arbitrarily large samples of sequenced or genotyped men
Other
103 stars 24 forks source link

the problems in installation #23

Closed XiaoleLei closed 9 months ago

XiaoleLei commented 9 months ago

Hi,

when I installed the yhaplo using command "pip install --editable ." I got an error like followed. Could you give some advise to solve it? Thank you so much.

Best, Xiaole

error

Obtaining file:///data1/apps/Yhaplo/yhaplo-2.0.2 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 ╰─> [43 lines of output] Traceback (most recent call last): File "/root/miniconda3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/root/miniconda3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.11/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-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 468, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 5, in File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/init.py", line 103, in setup return distutils.core.setup(attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 147, in setup _setup_distribution = dist = klass(attrs) ^^^^^^^^^^^^ File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 303, in init _Distribution.init(self, dist_attrs) File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 283, in init self.finalize_options() File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 680, in finalize_options ep(self) File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 125, in infer_version _assign_version(dist, config) File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 57, in _assign_version _version_missing(config) File "/tmp/pip-build-env-jw98plu8/overlay/lib/python3.11/site-packages/setuptools_scm/_get_version_impl.py", line 108, in _version_missing raise LookupError( LookupError: setuptools-scm was unable to detect version for /data1/apps/Yhaplo/yhaplo-2.0.2.

  Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

  For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
  [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.

error

dpoznik commented 9 months ago

Hi, thanks for writing in. As the error message suggests, yhaplo is currently only installable "from a fully intact git repository" (i.e., not from the release .zip or .tar.gz). Here are instructions for cloning the repo and installing: https://github.com/23andMe/yhaplo#basic-installation

Does that work for you?

XiaoleLei commented 9 months ago

Hi David,

Thank you for your prompt response. Your advice was very effective. I have successfully installed yhaplo. However, sometimes "git clone git@github.com:23andMe/yhaplo.git" doesn't work. I had good results using "git clone https://github.com/23andMe/yhaplo.git". Anyway, thank you for your help again.

Best, Xiaole

dpoznik commented 9 months ago

OK, great. I'm glad you're all set. Cloning with HTTPS is fine for this purpose.

If you're having trouble cloning with SSH, these GitHub docs may help: https://docs.github.com/en/authentication/connecting-to-github-with-ssh