cta-observatory / pyeventio

Python read-only implementation for the EventIO data format used by the CORSIKA 7 IACT extension and sim_telarray
MIT License
10 stars 12 forks source link

Error on install due to missing cython #239

Closed watsonjj closed 2 years ago

watsonjj commented 2 years ago

On a recent reinstall of a package which depends on pyeventio, I get the following error describing a missing install of Cython to be able to build eventio 1.6.1 locally:

Installed /home/runner/work/sstcam-simulation/sstcam-simulation
Processing dependencies for sstcam-simulation==2.2.0
Searching for eventio>=1.4.1
Reading https://pypi.org/simple/eventio/
Downloading https://files.pythonhosted.org/packages/76/0c/012dac6ce014eb4b7db67c2c798a3b70fa50193ccadd5dd2ce39428428b0/eventio-1.6.1.tar.gz#sha[25](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:25)6=980559675c946[26](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:26)55b4e9c63add951a771dfa33e635913818238b823fb0e5598
Best match: eventio 1.6.1
Processing eventio-1.6.1.tar.gz
Writing /tmp/easy_install-qxnminjt/eventio-1.6.1/setup.cfg
Running eventio-1.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-qxnminjt/eventio-1.6.1/egg-dist-tmp-kdeqji6p
using cython False
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 156, in save_modules
    yield saved
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-qxnminjt/eventio-1.6.1/setup.py", line 46, in <module>
ImportError: You need `Cython` to build this project locally

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 36, in <module>
    '': ['data/*'],
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/develop.py", line 1[29](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:29), in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 745, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/pkg_resources/__init__.py", line 768, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 669, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 695, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1162, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
    run_setup(setup_script, args)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 262, in run_setup
    raise
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/contextlib.py", line 1[30](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:30), in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 169, in save_modules
    saved_exc.resume()
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 1[43](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:43), in resume
    raise exc.with_traceback(self._tb)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 156, in save_modules
    yield saved
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "/usr/share/miniconda/envs/sstcam-simulation/lib/python3.7/site-packages/setuptools/sandbox.py", line [46](https://github.com/sstcam/sstcam-simulation/runs/5551251360?check_suite_focus=true#step:5:46), in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-qxnminjt/eventio-1.6.1/setup.py", line 46, in <module>
ImportError: You need `Cython` to build this project locally
Error: Process completed with exit code 1.
maxnoe commented 2 years ago

This looks like a very outdated pip that does not understand pep 517 yet. Cython is part of the build dependencies in pyproject.toml and should be installed automatically for building the wheel when using a non-ancient pip.

Please either update pip or install the build dependencies manually or use the conda-forge packages.

https://github.com/cta-observatory/pyeventio/blob/3fc3406624873089442d8ab0aff8e9e2a2ef6a48/pyproject.toml#L1-L3