Zappa: Zappa failing due to newer version of setuptools

https://github.com/zappa/Zappa/blob/39f75e76d28c1a08d4de6501e6f794fe988cbc98/zappa/core.py#L22

https://github.com/zappa/Zappa/blob/39f75e76d28c1a08d4de6501e6f794fe988cbc98/zappa/core.py#L690

Env details

Python version: 3.10
pip version: 24.2
setuptools version: 75.0.0

Logs

  File "/_venv/lib/python3.10/site-packages/zappa/core.py", line 690, in create_lambda_zip
        copy_tree(temp_package_path, temp_project_path, update=True)
  File "/_venv/lib/python3.10/site-packages/setuptools/_distutils/dir_util.py", line 155, in copy_tree
    return list(itertools.chain.from_iterable(map(copy_one, names)))
  File "/_venv/lib/python3.10/site-packages/setuptools/_distutils/dir_util.py", line 197, in _copy_one
    file_util.copy_file(
  File "/_venv/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 104, in copy_file
    from distutils._modified import newer
ModuleNotFoundError: No module named 'distutils._modified'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 14
  • Comments: 21 (1 by maintainers)

Commits related to this issue

Most upvoted comments

A bit concerning that this PR is still sitting in a review state. Every one of my personal and work-related GitHub Actions deployment scripts using Zappa are failing because of this bug.

For the poetry users, I was able to fix this by pinning an older version of setuptools, similar to the other responses above:

poetry add setuptools@69.5.1

For anyone else who is using Github actions to deploy and using pipenv, you will have tough time fixing the setuptools version because #pipenv takes the latest.

So you will have update the virtualenv after install like pipenv install -r requirements.txt --python 3.8 pipenv run pip install setuptools==74.1.2

setuptools==74.1.2

@carlos-schwabe

released in 0.60.0

closing.

Looks like this has been fixed on main with the merging of https://github.com/zappa/Zappa/pull/1352

When can we expect a release including the fix?

Following

I temporarilly forced the previous version of setup-tools and it worked