Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setuptools DeprecationError when trying to build docker-compose python app

I'm trying to install fastapi-pagination library. When I add it to the requirements.txt and try to build docker compose, the error occurs:

    × Getting requirements to build wheel did not run successfully.
#0 34.42   │ exit code: 1
#0 34.42   ╰─> [62 lines of output]
#0 34.42       /tmp/pip-build-env-leq01370/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
#0 34.42       !!
#0 34.42       
#0 34.42               ********************************************************************************
#0 34.42               The license_file parameter is deprecated, use license_files instead.
#0 34.42       
#0 34.42               By 2023-Oct-30, you need to update your project and remove deprecated calls
#0 34.42               or your builds will no longer be supported.
#0 34.42       
#0 34.42               See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
#0 34.42               ********************************************************************************

The end of Traceback:

#0 34.17           raise AttributeError(attr)
#0 34.17       AttributeError: cython_sources
#0 34.17       [end of output]
#0 34.17   
#0 34.17   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 34.18 error: subprocess-exited-with-error
#0 34.18 
#0 34.18 × Getting requirements to build wheel did not run successfully.
#0 34.18 │ exit code: 1
#0 34.18 ╰─> See above for output.
#0 34.18 
#0 34.18 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 34.48 
#0 34.48 [notice] A new release of pip available: 22.2.1 -> 23.2
#0 34.48 [notice] To update, run: pip install --upgrade pip
------
failed to solve: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

Without fastapi-pagination everything works fine.

like image 256
TeraBasedProgrammer Avatar asked Mar 09 '26 02:03

TeraBasedProgrammer


1 Answers

I've got the same problem.

I was able to fix it by downgrading PyYaml to 5.3.1

In my requrements.txt it's looks like that

PyYAML==5.3.1
docker==6.0.1
docker-compose==1.29.2
like image 89
Konstantin GidMaster Syrovatsk Avatar answered Mar 11 '26 16:03

Konstantin GidMaster Syrovatsk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!