src-d / hercules

Gaining advanced insights from Git repository history.
Other
2.59k stars 264 forks source link

Document Python 3.7 requirement in README #385

Open znerd opened 2 years ago

znerd commented 2 years ago

Suggestion: Document the Python 3.7 requirement in the README file.

will-gant commented 1 year ago

For reference, any version above 3.7.16 will fail to install python/requirements.txt

puradawid commented 1 year ago

Do you mean this error, @will-gant?

Collecting PyYAML<6.0,>=3.0
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      running egg_info
      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 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 271, in <module>
          setup(
        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 299, in run
          self.find_sources()
        File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 306, in find_sources
          mm.run()
        File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 541, in run
          self.add_defaults()
        File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 578, in add_defaults
          sdist.add_defaults(self)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/sdist.py", line 228, in add_defaults
          self._add_defaults_ext()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/sdist.py", line 312, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
        File "setup.py", line 201, in get_source_files
          self.cython_sources(ext.sources, ext)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]
FlorianCassayre commented 10 months ago

@puradawid Yes.

lucasrodes commented 4 months ago

I was getting very confused with this. Thanks for reporting this.

legzo commented 2 months ago

Thanks for the info, alas, I can't get it to build, even with python 3.7.15. I have the same error @puradawid pasted :

$ pyenv install 3.7.15
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.15.tar.xz...
-> https://www.python.org/ftp/python/3.7.15/Python-3.7.15.tar.xz
Installing Python-3.7.15...
...
...
python-build: use zlib from xcode sdk
Installed Python-3.7.15 to /Users/jterrier/.pyenv/versions/3.7.15

$ pyenv global 3.7.15

$ python -V
Python 3.7.15

$ pip install labours
Collecting labours
  Using cached labours-10.7.2-py3-none-any.whl (69 kB)
Collecting seriate<2.0,>=1.1.2
  Using cached seriate-1.1.2-py3-none-any.whl (8.5 kB)
...
...
Collecting PyYAML<6.0,>=3.0
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      ...
      ...
      File "/private/var/folders/jw/jhxnv5fs04n5zrs1dglj15gm0000gn/T/pip-build-env-3bpentn3/overlay/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

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

Am I still missing something here ?