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

Cython compile error when installing with pip #354

Open
ZuzannaSadowska opened this issue Feb 21, 2024 · 0 comments
Open

Cython compile error when installing with pip #354

ZuzannaSadowska opened this issue Feb 21, 2024 · 0 comments

Comments

@ZuzannaSadowska
Copy link

Thank you for your bug report!

Please fill out the following template.

PLATFORM (Mac, PC, Linux, other):

Mac and Linux

OPERATING SYSTEM (eg OSX 10.7, Windows 8.1):

MacOS 12.5.1 (21G83)
Linux a986d33834a9 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

SEVERITY (Critical? Major? Minor? Enhancement?):

DESCRIPTION:

  • What were you trying to do?
    Tried to install cytoflow using pip install cytoflow

  • What happened?

~ pip install cytoflow

Collecting cytoflow
  Downloading cytoflow-1.2.tar.gz (14.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.7/14.7 MB 6.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting numpy==1.21.2
  Downloading numpy-1.21.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.1/13.1 MB 3.9 MB/s eta 0:00:00
Collecting pandas==1.3.5
  Downloading pandas-1.3.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.9/10.9 MB 43.7 MB/s eta 0:00:00
Collecting matplotlib==3.5.0
  Downloading matplotlib-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (11.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 6.9 MB/s eta 0:00:00
Collecting bottleneck==1.3.2
  Downloading Bottleneck-1.3.2.tar.gz (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.2/88.2 kB 257.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numexpr==2.8.1
  Downloading numexpr-2.8.1.tar.gz (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.8/94.8 kB 330.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting scipy==1.7.3
  Downloading scipy-1.7.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (36.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.6/36.6 MB 38.6 MB/s eta 0:00:00
Collecting scikit-learn==1.0.1
  Downloading scikit_learn-1.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (26.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.4/26.4 MB 7.2 MB/s eta 0:00:00
Collecting seaborn==0.11.2
  Downloading seaborn-0.11.2-py3-none-any.whl (292 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.8/292.8 kB 75.1 MB/s eta 0:00:00
Collecting statsmodels==0.13.0
  Downloading statsmodels-0.13.0.tar.gz (17.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.8/17.8 MB 9.7 MB/s eta 0:00:00
  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
  ╰─> [141 lines of output]
      <string>:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      <string>:53: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      <string>:56: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      <string>:53: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          # smooth
          for i in range(n):
              prev = (n+i-1) % n

              # s[t-m] = xhat[prev, 2+m-1]
              yhat[i] = (xhat[prev, 0] * xhat[prev, 1]**phi) + xhat[prev, 2+m-1]
                                                             ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:156:55: Cannot assign type 'npy_float64 complex' to 'float64_t'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

              # s[t-m] = xhat[prev, 2+m-1]
              yhat[i] = (xhat[prev, 0] * xhat[prev, 1]**phi) + xhat[prev, 2+m-1]
              # l_t = a * (y_t - s_t-m) + (1-a) * (l_t-1 * b_t-1**phi)
              xhat[i, 0] = (alpha * (y[i] - xhat[prev, 2+m-1])
                            + (1 - alpha) * (xhat[prev, 0] * xhat[prev, 1]**phi))
                            ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:159:22: Cannot assign type 'npy_float64 complex' to 'float64_t'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              # l_t = a * (y_t - s_t-m) + (1-a) * (l_t-1 * b_t-1**phi)
              xhat[i, 0] = (alpha * (y[i] - xhat[prev, 2+m-1])
                            + (1 - alpha) * (xhat[prev, 0] * xhat[prev, 1]**phi))
              # b_t = (b*) * (l_t / l_t-1) + (1 - (b*)) * b_t-1**phi
              xhat[i, 1] = (beta_star * (xhat[i, 0] / xhat[prev, 0])
                            + (1 - beta_star) * xhat[prev, 1]**phi)
                            ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:162:22: Cannot assign type 'npy_float64 complex' to 'float64_t'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          # smooth
          for i in range(n):
              prev = (n+i-1) % n

              # s[t-m] = xhat[prev, 2+m-1]
              yhat[i] = (xhat[prev, 0] * xhat[prev, 1]**phi) * xhat[prev, 2+m-1]
                                                             ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:191:55: Cannot assign type 'npy_float64 complex' to 'float64_t'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

              # s[t-m] = xhat[prev, 2+m-1]
              yhat[i] = (xhat[prev, 0] * xhat[prev, 1]**phi) * xhat[prev, 2+m-1]
              # l_t = a * (y_t / s_t-m) + (1-a) * (l_t-1 * b_t-1**phi)
              xhat[i, 0] = (alpha * (y[i] / xhat[prev, 2+m-1])
                            + (1 - alpha) * (xhat[prev, 0] * xhat[prev, 1]**phi))
                            ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:194:22: Cannot assign type 'npy_float64 complex' to 'float64_t'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              # l_t = a * (y_t / s_t-m) + (1-a) * (l_t-1 * b_t-1**phi)
              xhat[i, 0] = (alpha * (y[i] / xhat[prev, 2+m-1])
                            + (1 - alpha) * (xhat[prev, 0] * xhat[prev, 1]**phi))
              # b_t = (b*) * (l_t / l_t-1) + (1 - (b*)) * b_t-1**phi
              xhat[i, 1] = (beta_star * (xhat[i, 0] / xhat[prev, 0])
                            + (1 - beta_star) * xhat[prev, 1]**phi)
                            ^
      ------------------------------------------------------------

      statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:197:22: Cannot assign type 'npy_float64 complex' to 'float64_t'
      Compiling statsmodels/tsa/_stl.pyx because it changed.
      Compiling statsmodels/tsa/holtwinters/_exponential_smoothers.pyx because it changed.
      Compiling statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx because it changed.
      Compiling statsmodels/tsa/_innovations.pyx because it changed.
      Compiling statsmodels/tsa/regime_switching/_hamilton_filter.pyx because it changed.
      Compiling statsmodels/tsa/regime_switching/_kim_smoother.pyx because it changed.
      Compiling statsmodels/tsa/innovations/_arma_innovations.pyx because it changed.
      Compiling statsmodels/nonparametric/linbin.pyx because it changed.
      Compiling statsmodels/robust/_qn.pyx because it changed.
      Compiling statsmodels/nonparametric/_smoothers_lowess.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_initialization.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_representation.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_kalman_filter.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_filters/_conventional.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_filters/_inversions.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_filters/_univariate.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_kalman_smoother.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_smoothers/_alternative.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_smoothers/_classical.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_smoothers/_conventional.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_smoothers/_univariate.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_simulation_smoother.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_cfa_simulation_smoother.pyx because it changed.
      Compiling statsmodels/tsa/statespace/_tools.pyx because it changed.
      [ 1/26] Cythonizing statsmodels/nonparametric/_smoothers_lowess.pyx
      [ 2/26] Cythonizing statsmodels/nonparametric/linbin.pyx
      [ 3/26] Cythonizing statsmodels/robust/_qn.pyx
      [ 4/26] Cythonizing statsmodels/tsa/_innovations.pyx
      [ 5/26] Cythonizing statsmodels/tsa/_stl.pyx
      [ 6/26] Cythonizing statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx
      Traceback (most recent call last):
        File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 304, in <module>
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-vmg419vk/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx
      [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 wheel 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.
  • What did you expect to happen?
    Expected the install to work

Don't forget to attach the log file to this bug report!

If you are having trouble with a particular FCS file, please attach that file too.

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

1 participant