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

Error installing Pyyaml==5.4, Cython_sources #724

Closed
MeliJuanmi opened this issue Jul 17, 2023 · 101 comments
Closed

Error installing Pyyaml==5.4, Cython_sources #724

MeliJuanmi opened this issue Jul 17, 2023 · 101 comments

Comments

@MeliJuanmi
Copy link

I am tyring to install the 5.4 version, but I got the following output:

`Collecting pyyaml==5.4
Using cached PyYAML-5.4.tar.gz (174 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
╰─> [68 lines of output]
/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in setup.cfg
!!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.
  
          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  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
  Traceback (most recent call last):
    File "/Users/uangutierrez/.fury/fury_venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/uangutierrez/.fury/fury_venv/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 "/Users/uangutierrez/.fury/fury_venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 271, in <module>
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
      self.find_sources()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
      mm.run()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
      self.add_defaults()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
      sdist.add_defaults(self)
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
      super().add_defaults()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
      self._add_defaults_ext()
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
      self.filelist.extend(build_ext.get_source_files())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<string>", line 201, in get_source_files
    File "/private/var/folders/jq/gc3kdhbj0tg3r798nj8wlgl86xxhf9/T/pip-build-env-qbudtvrl/overlay/lib/python3.11/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

× 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.`

@94rain
Copy link

94rain commented Jul 17, 2023

I just had the same issue with pyyaml 6.0.0

Duplicate of #723?

@mcdonnnj
Copy link

Both are duplicates of #601. This has been on the horizon for a long time apparently.

@MeliJuanmi
Copy link
Author

Yes, but I see it is again backup discussion, just 50 minutes ago !

@wesleykendall
Copy link

Yea seems like now things are going to break more loudly for others since Cython3 was released.

@AlexDld
Copy link

AlexDld commented Jul 17, 2023

You can use PyYaml 5.3.1 until the issue is resolved.

@henryiii
Copy link

henryiii commented Jul 17, 2023

This has broken Python 3.12 as well; there aren't pre-built wheels for 3.12 yet (ABI is now supposed to be stable as of beta 4, so you can add them ;) )

Setting:

"pyyaml!=6.0.0,!=5.4.0,!=5.4.1", # pyyaml is broken with cython 3

Does work for now on 3.12.

@AndrewCharlesHay
Copy link

You can use PyYaml 5.3.1 until the issue is resolved.

@AlexDld Thank you! Worked for me!

@olliemath
Copy link

Affecting us too and our security policy won't let us downgrade to 5.3 because of pre-5.4 vulnerabilities

But pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==6.0 did work (as per the linked issue)

@tschaffter
Copy link

tschaffter commented Jul 17, 2023

We are experiencing the same issue today with pyyaml@5.4.1. What I don't understand yet is why we were able to install this version on Friday and not today? What has changed since Friday?

On Friday:

image

Today: Failed to install /home/vscode/.cache/pypoetry/artifacts/b6/23/45/f5dfdd6e8ba0f620504858ddeb20b47f50b03d0c4b18f873f6575d2e78/PyYAML-5.4.1.tar.gz

@henryiii
Copy link

Cython 3.0 came out since Friday.

@johnthagen
Copy link

johnthagen commented Jul 17, 2023

Cython 3 was released 4 hours ago: https://pypi.org/project/Cython/3.0.0/#history

This coincides with when our PyYAML 6.0.0 installs via Poetry in Alpine Linux containers started failing. 😢

@andy-maier
Copy link

andy-maier commented Jul 17, 2023

We cannot use PyYAML 5.3 due to dependencies requiring 5.4.
On Python 3.10+3.11, using PyYAML 6.0 also works, because it provides wheel archives for these Python versions.

Is there a way to have PyYAML use Cython<3 for its installation?

perlpunk added a commit to yaml/yaml-runtimes that referenced this issue Jun 7, 2024
Downgrade pyyaml - yaml/pyyaml#724

Fix YAML::PP - path to event processor changed

Remove raku

Build problems:

    ===SORRY!===
    Could not find YAMLish at line 3 in:
        inst#/raku
        inst#/root/.perl6
        inst#/rakudo/share/perl6/site
        inst#/rakudo/share/perl6/vendor
        inst#/rakudo/share/perl6/core
        ap#
        nqp#
        perl5#

Remove Java - build problems...

Upgrade containers

Fix duplicate runtime
@RubTalha
Copy link

https://stackoverflow.com/questions/77490435/attributeerror-cython-sources

@Aeomar999
Copy link

You can use PyYaml 5.3.1 until the issue is resolved.

@AlexDld Thank you! Worked for me!

doesn't work for me

@rorar
Copy link

rorar commented Nov 1, 2024

I wanted to install csv2ofx on python311 and ran into this error.

pip install --upgrade wheel

and

pip install pyyaml==5.4.1 --no-build-isolation

solved it for me

Holzhaus added a commit to Holzhaus/mixxx-website that referenced this issue Nov 4, 2024
See yaml/pyyaml#724 for details. PyYAML 6.0.2
does not work because some dependencies depend on PyYAML 5.
MainRo added a commit to MainRo/RxPY that referenced this issue Nov 7, 2024
see yaml/pyyaml#724 for the origin of the
error. We can remove this once pyyaml 7.0 is released.
@C-L-STARK
Copy link

This has broken Python 3.12 as well; there aren't pre-built wheels for 3.12 yet (ABI is now supposed to be stable as of beta 4, so you can add them ;) )

Setting:

"pyyaml!=6.0.0,!=5.4.0,!=5.4.1", # pyyaml is broken with cython 3

Does work for now on 3.12.

work for me; thanks;

tmooney added a commit to tmooney/cloud-workflows that referenced this issue Dec 5, 2024
* Python tries to protect you, but that's less useful in a docker image.
* Incorporate workaround suggestion from yaml/pyyaml#724.
pfirsich added a commit to pfirsich/raydor that referenced this issue Dec 14, 2024
It seems installation of PyYAML 5.4.1 broke at some point, but it still works with 5.3.1: yaml/pyyaml#724
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