1

When I try to install ebcli using Python 3.11.4 (inside a venv, as per the official instructions) I get an error and I just can't get around it.

But If I try to install ebcli using Python 3.8.10(again inside a venv) it works.

The error looks like this:

        File "/tmp/pip-build-env-yn_umd7x/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 "/tmp/pip-build-env-yn_umd7x/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.

  • I already followed the troubleshooting recommendations, which consists on installing dependencies, and it didn't have any effect.
  • I already googled for this specific issue and I can't find a solution. I did find this issue containing AttributeError: cython_sources which might be related, but I don't know what action to take from there.
Ahtisham
  • 9,170
  • 4
  • 43
  • 57
Martin
  • 105
  • 10
  • 1
    It seem pyyaml issue did you check this: https://stackoverflow.com/questions/76708329/docker-compose-no-longer-building-image-attributeerror-cython-sources – Ahtisham Aug 09 '23 at 14:49
  • Thanks @Ahtisham, you pointed me in the right direction. I had to run this command `pip install --force-reinstall -v "PyYAML==6.0.1" --no-build-isolation` for solving the error. If you want you can post an answer below (please include the specific command) and I will select it as the correct one. Otherwise I will do it. – Martin Aug 10 '23 at 02:03
  • You can upvote if you think community can benefit from it. – Ahtisham Aug 10 '23 at 02:48

1 Answers1

1

It is the pyyaml issue I had the similar issue when upgrading a legacy project from django 2 to 4:

You can have a look at this post: Docker-compose no longer building image (AttributeError: cython_sources)

You can also try this

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

Just as mentioned here: https://github.com/yaml/pyyaml/issues/724#issuecomment-1638636728

Or just as you did it:

pip install --force-reinstall -v "PyYAML==6.0.1" --no-build-isolation

Note: dowgrading to previous version should always be avoided as it may have serious security issue and that is why new version are released like in case of pyyaml.

Ahtisham
  • 9,170
  • 4
  • 43
  • 57