'RuntimeError: __class__ not set defining 'AbstractBaseUser'

Django app works fine local, but when pushed to heroku build works, but deploy fails:

RuntimeError: __class__ not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was __classcell__ propagated to type.__new__?

reading older posts this has been attributed to Django version / python version incompatibilities. This is a recent version: Django 3.2.13 and Python 3.9.12. This is confirmed to work together. Tried downgrading / upgrading, but without succes.

Any one has an idea how to resolve?

Edit:

Buildlog:

-----> Using buildpack: https://github.com/heroku/heroku-buildpack-python
-----> Python app detected
-----> Using Python version specified in runtime.txt
-----> Requirements file has been changed, clearing cached dependencies
cp: cannot stat '/tmp/build_bb26317a/requirements.txt': No such file or directory
-----> Installing python-3.9.12
-----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
-----> Installing dependencies with Pipenv 2020.11.15
       Installing dependencies from Pipfile...
       Collecting black==22.3.0
         Downloading black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 19.3 MB/s eta 0:00:00
       Collecting typing-extensions>=3.10.0.0
         Downloading typing_extensions-4.2.0-py3-none-any.whl (24 kB)
       Collecting pathspec>=0.9.0
         Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
       Requirement already satisfied: platformdirs>=2 in ./.heroku/python/lib/python3.9/site-packages (from black==22.3.0->-r /tmp/pipenv-z5sdwjx1-requirements/pipenv-ed2lupa8-requirement.txt (line 1)) (2.5.2)
       Collecting click>=8.0.0
         Downloading click-8.1.3-py3-none-any.whl (96 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 4.3 MB/s eta 0:00:00
       Collecting tomli>=1.1.0
         Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
       Collecting mypy-extensions>=0.4.3
         Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
       Installing collected packages: mypy-extensions, typing-extensions, tomli, pathspec, click, black
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -ffi (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Successfully installed black-22.3.0 click-8.1.3 mypy-extensions-0.4.3 pathspec-0.9.0 tomli-2.0.1 typing-extensions-4.2.0
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting distlib==0.3.1
         Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 335.9/335.9 KB 13.7 MB/s eta 0:00:00
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Installing collected packages: distlib
         Attempting uninstall: distlib
           WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
           Found existing installation: distlib 0.3.4
           Uninstalling distlib-0.3.4:
             Successfully uninstalled distlib-0.3.4
       Successfully installed distlib-0.3.1
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting django==3.2.13
         Downloading Django-3.2.13-py3-none-any.whl (7.9 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 25.4 MB/s eta 0:00:00
       Collecting pytz
         Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 KB 16.5 MB/s eta 0:00:00
       Collecting sqlparse>=0.2.2
         Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.3/42.3 KB 5.4 MB/s eta 0:00:00
       Collecting asgiref<4,>=3.3.2
         Downloading asgiref-3.5.1-py3-none-any.whl (22 kB)
       WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Error parsing requirements for distlib: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/distlib-0.3.4.dist-info/METADATA'
       Installing collected packages: pytz, sqlparse, asgiref, django
         Attempting uninstall: asgiref
           WARNING: Ignoring invalid distribution -lick (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
           Found existing installation: asgiref 3.3.0
           Uninstalling asgiref-3.3.0:
             Successfully uninstalled asgiref-3.3.0
       Successfully installed asgiref-3.5.1 django-3.2.13 pytz-2022.1 sqlparse-0.4.2
       Collecting identify==1.5.6
         Downloading identify-1.5.6-py2.py3-none-any.whl (97 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.8/97.8 KB 3.4 MB/s eta 0:00:00
       Installing collected packages: identify
       WARNING: Ignoring invalid distribution -dna (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Successfully installed identify-1.5.6
       WARNING: Ignoring invalid distribution -dna (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -dna (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting ipython==7.19.0
         Downloading ipython-7.19.0-py3-none-any.whl (784 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 784.7/784.7 KB 14.1 MB/s eta 0:00:00
       Requirement already satisfied: decorator in ./.heroku/python/lib/python3.9/site-packages (from ipython==7.19.0->-r /tmp/pipenv-z5sdwjx1-requirements/pipenv-8u6evv4o-requirement.txt (line 1)) (4.4.2)
       Requirement already satisfied: backcall in ./.heroku/python/lib/python3.9/site-packages (from ipython==7.19.0->-r /tmp/pipenv-z5sdwjx1-requirements/pipenv-8u6evv4o-requirement.txt (line 1)) (0.2.0)
       Collecting pexpect>4.3
         Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 KB 14.0 MB/s eta 0:00:00
       Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
         Downloading prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 381.5/381.5 KB 16.9 MB/s eta 0:00:00
       Collecting pickleshare
         Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
       Collecting pygments
         Downloading Pygments-2.12.0-py3-none-any.whl (1.1 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 29.5 MB/s eta 0:00:00
       Collecting jedi>=0.10
         Downloading jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 42.7 MB/s eta 0:00:00
       Collecting traitlets>=4.2
         Downloading traitlets-5.1.1-py3-none-any.whl (102 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.0/102.0 KB 40.4 MB/s eta 0:00:00
       Requirement already satisfied: setuptools>=18.5 in ./.heroku/python/lib/python3.9/site-packages (from ipython==7.19.0->-r /tmp/pipenv-z5sdwjx1-requirements/pipenv-8u6evv4o-requirement.txt (line 1)) (60.10.0)
       Collecting parso<0.9.0,>=0.8.0
         Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.8/100.8 KB 42.6 MB/s eta 0:00:00
       Collecting ptyprocess>=0.5
         Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
       Requirement already satisfied: wcwidth in ./.heroku/python/lib/python3.9/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython==7.19.0->-r /tmp/pipenv-z5sdwjx1-requirements/pipenv-8u6evv4o-requirement.txt (line 1)) (0.2.5)
       WARNING: Ignoring invalid distribution -dna (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Error parsing requirements for isort: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/isort-5.10.1.dist-info/METADATA'
       Installing collected packages: ptyprocess, pickleshare, traitlets, pygments, prompt-toolkit, pexpect, parso, jedi, ipython
       Successfully installed ipython-7.19.0 jedi-0.18.1 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 prompt-toolkit-3.0.29 ptyprocess-0.7.0 pygments-2.12.0 traitlets-5.1.1
       WARNING: Ignoring invalid distribution -arso (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -arso (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting pluggy==0.13.1
         Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
       WARNING: Ignoring invalid distribution -arso (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Error parsing requirements for pathspec: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/pathspec-0.9.0.dist-info/METADATA'
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: pluggy
       Successfully installed pluggy-0.13.1
       Collecting psycopg2-binary==2.8.6
         Downloading psycopg2_binary-2.8.6-cp39-cp39-manylinux1_x86_64.whl (3.0 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 20.6 MB/s eta 0:00:00
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: psycopg2-binary
       WARNING: Ignoring invalid distribution -ilelock (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Successfully installed psycopg2-binary-2.8.6
       WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting pycodestyle==2.6.0
         Using cached pycodestyle-2.6.0-py2.py3-none-any.whl (41 kB)
       WARNING: Error parsing requirements for prompt-toolkit: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/prompt_toolkit-3.0.29.dist-info/METADATA'
       WARNING: Error parsing requirements for filelock: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/filelock-3.0.12.dist-info/METADATA'
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Installing collected packages: pycodestyle
         Attempting uninstall: pycodestyle
           Found existing installation: pycodestyle 2.7.0
           Uninstalling pycodestyle-2.7.0:
             Successfully uninstalled pycodestyle-2.7.0
       WARNING: Ignoring invalid distribution -ycparser (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
       flake8 3.9.2 requires pycodestyle<2.8.0,>=2.7.0, but you have pycodestyle 2.6.0 which is incompatible.
       Successfully installed pycodestyle-2.6.0
       WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting pycparser==2.20
         Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.0/112.0 KB 6.9 MB/s eta 0:00:00
       WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Error parsing requirements for ptyprocess: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/ptyprocess-0.7.0.dist-info/METADATA'
       WARNING: Error parsing requirements for filelock: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/filelock-3.0.12.dist-info/METADATA'
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: pycparser
         Attempting uninstall: pycparser
           WARNING: Ignoring invalid distribution -rompt-toolkit (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
           Found existing installation: pycparser 2.21
           Uninstalling pycparser-2.21:
             Successfully uninstalled pycparser-2.21
       Successfully installed pycparser-2.20
       WARNING: Ignoring invalid distribution -yflakes (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting pyparsing==2.4.7
         Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.8/67.8 KB 3.1 MB/s eta 0:00:00
       WARNING: Error parsing requirements for pyflakes: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/pyflakes-2.3.1.dist-info/METADATA'
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       WARNING: Ignoring invalid distribution -yflakes (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Installing collected packages: pyparsing
         Attempting uninstall: pyparsing
           Found existing installation: pyparsing 3.0.8
           Uninstalling pyparsing-3.0.8:
             Successfully uninstalled pyparsing-3.0.8
       Successfully installed pyparsing-2.4.7
       An error occurred while installing pytest-sugar==0.9.4! Will try again.
       WARNING: Ignoring invalid distribution -ython-dateutil (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting redis==3.5.3
         Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.1/72.1 KB 8.3 MB/s eta 0:00:00
       ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
           return self.__dep_map
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
           raise AttributeError(attr)
       AttributeError: _DistInfoDistribution__dep_map
       
       During handling of the above exception, another exception occurred:
       
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
           return self._pkg_info
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
           raise AttributeError(attr)
       AttributeError: _pkg_info
       
       During handling of the above exception, another exception occurred:
       
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 529, in _determine_conflicts
           return check_install_conflicts(to_install)
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 101, in check_install_conflicts
           package_set, _ = create_package_set_from_installed()
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 42, in create_package_set_from_installed
           dependencies = list(dist.iter_dependencies())
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 202, in iter_dependencies
           return self._dist.requires(extras)
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
           dm = self._dep_map
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
           self.__dep_map = self._compute_dependencies()
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
           for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
           metadata = self.get_metadata(self.PKG_INFO)
         File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1895, in get_metadata
           raise KeyError("No metadata except PKG-INFO is available")
       KeyError: 'No metadata except PKG-INFO is available'
       Installing collected packages: redis
         Attempting uninstall: redis
           Found existing installation: redis 4.2.2
           Uninstalling redis-4.2.2:
             Successfully uninstalled redis-4.2.2
       Successfully installed redis-3.5.3
       WARNING: Ignoring invalid distribution -equests (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Ignoring invalid distribution -equests (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Collecting snowballstemmer==2.0.0
         Downloading snowballstemmer-2.0.0-py2.py3-none-any.whl (97 kB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.0/97.0 KB 16.0 MB/s eta 0:00:00
       WARNING: Ignoring invalid distribution -equests (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: snowballstemmer
       Successfully installed snowballstemmer-2.0.0
       An error occurred while installing sphinx-autobuild==2020.9.1! Will try again.
       Collecting typing-extensions==3.7.4.3
         Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: typing-extensions
         Attempting uninstall: typing-extensions
           Found existing installation: typing_extensions 4.2.0
           Uninstalling typing_extensions-4.2.0:
             Successfully uninstalled typing_extensions-4.2.0
       WARNING: Ignoring invalid distribution -irtualenv (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
       pylint 2.13.8 requires typing-extensions>=3.10.0; python_version < "3.10", but you have typing-extensions 3.7.4.3 which is incompatible.
       mypy 0.950 requires typing-extensions>=3.10, but you have typing-extensions 3.7.4.3 which is incompatible.
       django-stubs 1.10.0 requires mypy<0.950,>=0.930, but you have mypy 0.950 which is incompatible.
       black 22.3.0 requires click>=8.0.0, but you have click 7.1.2 which is incompatible.
       black 22.3.0 requires pathspec>=0.9.0, but you have pathspec 0.8.0 which is incompatible.
       black 22.3.0 requires typing-extensions>=3.10.0.0; python_version < "3.10", but you have typing-extensions 3.7.4.3 which is incompatible.
       astroid 2.11.4 requires typing-extensions>=3.10; python_version < "3.10", but you have typing-extensions 3.7.4.3 which is incompatible.
       Successfully installed typing-extensions-3.7.4.3
       Collecting pillow==8.0.0
         Downloading Pillow-8.0.0-cp39-cp39-manylinux1_x86_64.whl (2.2 MB)
            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 19.5 MB/s eta 0:00:00
       WARNING: Error parsing requirements for cryptography: [Errno 2] No such file or directory: '/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages/cryptography-37.0.2.dist-info/METADATA'
       Installing collected packages: pillow
         Attempting uninstall: pillow
           Found existing installation: Pillow 9.1.0
           Uninstalling Pillow-9.1.0:
             Successfully uninstalled Pillow-9.1.0
       WARNING: Ignoring invalid distribution -ygments (/tmp/build_bb26317a/.heroku/python/lib/python3.9/site-packages)
       Successfully installed pillow-8.0.0
       An error occurred while installing sphinx==3.2.1! Will try again.
       Installing initially failed dependencies...
-----> Installing SQLite3
-----> Skipping Django collectstatic since the env var DISABLE_COLLECTSTATIC is set.
-----> Discovering process types
       Procfile declares types -> beat, release, web, worker
-----> Compressing...
       Done: 228.2M```



Solution 1:[1]

The issue had to do with Pipfile and local requirements.txt. Not exactly pinpointed the problem, but by deleting the Pipfile and making sure the requirements.txt was complete and leading for deployment, the issue was resolved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 bjorn