Question

Django App Deployment Failed | Buildpacks?

× 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!


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
April 18, 2023
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.

  • Check your Python version: Make sure you are using a compatible Python version for your project. You can specify a Python version by including a runtime.txt file in the root directory of your project with the desired version, for example:
  1. python-3.9.9

DigitalOcean’s App Platform will use this file to set the appropriate Python version during deployment.

  • Check your 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:
  1. backports.zoneinfo==latest_version
  • If updating the package does not work, you can try using an alternative package with similar functionality, such as 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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.