× Building wheel for backports.zoneinfo (pyproject.toml) did not run successfully.
[2023-04-17 12:14:42] │ │ exit code: 1
[2023-04-17 12:14:42] │ ╰─> [43 lines of output]
[2023-04-17 12:14:42] │ /tmp/pip-build-env-hvguttl9/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
[2023-04-17 12:14:42] │ warnings.warn(msg, warning_class)
[2023-04-17 12:14:42] │ running bdist_wheel
[2023-04-17 12:14:42] │ running build
[2023-04-17 12:14:42] │ running build_py
[2023-04-17 12:14:42] │ creating build
[2023-04-17 12:14:42] │ creating build/lib.linux-x86_64-cpython-310
[2023-04-17 12:14:42] │ creating build/lib.linux-x86_64-cpython-310/backports
[2023-04-17 12:14:42] │ copying src/backports/__init__.py -> build/lib.linux-x86_64-cpython-310/backports
[2023-04-17 12:14:42] │ creating build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/__init__.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/_common.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/_version.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ running egg_info
[2023-04-17 12:14:42] │ writing src/backports.zoneinfo.egg-info/PKG-INFO
[2023-04-17 12:14:42] │ writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
[2023-04-17 12:14:42] │ writing requirements to src/backports.zoneinfo.egg-info/requires.txt
[2023-04-17 12:14:42] │ writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
[2023-04-17 12:14:42] │ reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
[2023-04-17 12:14:42] │ reading manifest template 'MANIFEST.in'
[2023-04-17 12:14:42] │ warning: no files found matching '*.png' under directory 'docs'
[2023-04-17 12:14:42] │ warning: no files found matching '*.svg' under directory 'docs'
[2023-04-17 12:14:42] │ no previously-included directories found matching 'docs/_build'
[2023-04-17 12:14:42] │ no previously-included directories found matching 'docs/_output'
[2023-04-17 12:14:42] │ adding license file 'LICENSE'
[2023-04-17 12:14:42] │ adding license file 'licenses/LICENSE_APACHE'
[2023-04-17 12:14:42] │ writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ copying src/backports/zoneinfo/py.typed -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
[2023-04-17 12:14:42] │ running build_ext
[2023-04-17 12:14:42] │ building 'backports.zoneinfo._czoneinfo' extension
[2023-04-17 12:14:42] │ creating build/temp.linux-x86_64-cpython-310
[2023-04-17 12:14:42] │ creating build/temp.linux-x86_64-cpython-310/lib
[2023-04-17 12:14:42] │ gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.10 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-cpython-310/lib/zoneinfo_module.o -std=c99
[2023-04-17 12:14:42] │ lib/zoneinfo_module.c: In function ‘zoneinfo_fromutc’:
[2023-04-17 12:14:42] │ lib/zoneinfo_module.c:600:19: error: ‘_PyLong_One’ undeclared (first use in this function); did you mean ‘_PyLong_New’?
[2023-04-17 12:14:42] │ one = _PyLong_One;
[2023-04-17 12:14:42] │ ^~~~~~~~~~~
[2023-04-17 12:14:42] │ _PyLong_New
[2023-04-17 12:14:42] │ lib/zoneinfo_module.c:600:19: note: each undeclared identifier is reported only once for each function it appears in
[2023-04-17 12:14:42] │ error: command '/usr/bin/gcc' failed with exit code 1
[2023-04-17 12:14:42] │ [end of output]
[2023-04-17 12:14:42] │
[2023-04-17 12:14:42] │ note: This error originates from a subprocess, and is likely not a problem with pip.
[2023-04-17 12:14:42] │ ERROR: Failed building wheel for backports.zoneinfo
[2023-04-17 12:14:42] │ Failed to build backports.zoneinfo
[2023-04-17 12:14:42] │ ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
[2023-04-17 12:14:42] │ ERROR: failed to build: exit status 1
[2023-04-17 12:14:42] │
[2023-04-17 12:14:42] │
[2023-04-17 12:14:42] │ For documentation on the buildpacks used to build your app, please see:
[2023-04-17 12:14:42] │
[2023-04-17 12:14:42] │ Python v1.224.4 https://do.co/apps-buildpack-python
Not really sure what to do from here. Is this related to my requirements.txt file? This is my first time deploying an app so I followed the guide and not sure what/where I went wrong.
Thanks for the help!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello @bigaquamarinesnorkler,
The error you are facing is likely due to a compatibility issue between the package and the Python version you are using.
runtime.txt
file in the root directory of your project with the desired version, for example:- python-3.9.9
DigitalOcean’s App Platform will use this file to set the appropriate Python version during deployment.
requirements.txt
file: Ensure that all the packages and their versions are compatible with your Python version. You can also try updating the backports.zoneinfo
package to the latest version by specifying it in your requirements.txt
file:- backports.zoneinfo==latest_version
pytz
. Replace backports.zoneinfo
with pytz
in your requirements.txt
file. Please note, if it comes to this, After making these changes, you will need to modify your Django project to use the new package.Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.