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 · 98 comments
Closed

Error installing Pyyaml==5.4, Cython_sources #724

MeliJuanmi opened this issue Jul 17, 2023 · 98 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?

fwiesel added a commit to sapcc/requirements that referenced this issue Apr 8, 2024
Cython 3 came out with breaking changes, but PyYAML didn't
pin the major version in the build process.

Change-Id: I055d9575c237775c0e8de8901ec109f118a3eada
@AndrewTKent
Copy link

This worked!

pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==5.4.1

@souibguimohamed
Copy link

thank you @AndrewTKent, this worked for me too

@jin-raii
Copy link

my project was using PyYAML==6.0
@AndrewTKent thank you problem solved

abhinavsingh added a commit to abhinavsingh/proxy.py that referenced this issue Apr 10, 2024
abhinavsingh added a commit to abhinavsingh/proxy.py that referenced this issue Apr 10, 2024
abhinavsingh added a commit to abhinavsingh/proxy.py that referenced this issue Apr 11, 2024
* Use www.google.com for http2 tests

* Update README.md

Add missing tutorial's link

(cherry picked from commit e459f93)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* System packages for readthedocs

* Pin pyyaml, see yaml/pyyaml#724

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ignore flake8 S507

* precommit `pyyaml==5.3.1`

* follow yaml/pyyaml#724

* pin to essentials_openapi==0.1.4 for blacksheep

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove blacksheep dep

* remove system_packages

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check if tox upgrade helps with `ERROR: FAIL could not package project ` tox related issues

* Fix links

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use `importlib.metadata` instead of `pkg_resources`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Just remove link from plugin docstring for now

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin `sphinxcontrib-applehelp==1.0.2` which is breaking spellcheck

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Pin `sphinxcontrib-*`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin `towncrier` too

* add kwargs as a spelling

* `_get_dist` backward compatible with 3.6

* Use `httpbingo.org` instead of `httpbin.org` in tests making network requests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use `httpbingo` for reverse proxy plugin too which is tested in workflows

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `importlib-metadata; python_version <= 3.7`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Integration test changes due to usage of httpbingo instead of httpbin

* `importlib-metadata; python_version <= 3.7` moved to build essentials and bypass reverse proxy integration test result verification for now

* Filter and ignore `DeprecationWarning` to make it work on 3.7

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* with deprecation ignore we dont need `importlib-metadata`

---------

Co-authored-by: Wermeille Bastien <bastien.wermeille@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
hdenman added a commit to hdenman/pysystemtrade that referenced this issue Apr 14, 2024
@raton1180
Copy link

raton1180 commented May 6, 2024

pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==6.0

This works for me
https://stackoverflow.com/questions/76868274/build-failed-with-aws-ebcli-on-python-3-11-4

@ReenigneArcher
Copy link

This worked!

pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==5.4.1

Thank you! Adding --no-build-isolation solved it for me as well. Facing this issue on a legacy project after github moved latest macos runners to arm64.

perlpunk added a commit to yaml/yaml-runtimes that referenced this issue Jun 2, 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
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
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

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