tolang0825
tolang0825

Reputation: 61

Getting "ERROR: Double requirement given: setuptools" error in zappa

I tried to deploy my Flask app with zappa==0.52.0, but I get an error as below;

ERROR: Double requirement given: setuptools (already in setuptools==52.0.0.post20210125, name='setuptools') WARNING: You are using pip version 20.2.3; however, version 21.1.3 is available. You should consider upgrading via the '/Users/yoonshinkwark/Documents/JBR_reco_local_2/JBR_reco_API_2/dola-aldagram/aws-flask38/bin/python3.8 -m pip install --upgrade pip' command. Oh no! An error occurred! :(

Traceback (most recent call last): File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 3422, in handle sys.exit(cli.handle()) File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 588, in handle self.dispatch_command(self.command, stage) File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 630, in dispatch_command self.deploy(self.vargs["zip"], self.vargs["docker_image_uri"]) File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 852, in deploy self.create_package() File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 2760, in create_package venv=self.zappa.create_handler_venv(), File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/core.py", line 513, in create_handler_venv raise EnvironmentError("Pypi lookup failed") OSError: Pypi lookup failed

The version of Python is 3.8.8.

Upvotes: 6

Views: 2212

Answers (1)

ilse2005
ilse2005

Reputation: 11439

There is already an issue in the zappa github: https://github.com/zappa/Zappa/issues/995

The problem is that zappa adds setup-tools to its dependencies but the latest release of pip-tools (6.2.0) does the same now.

As a quick fix, you can pin pip-tools to version 6.1.0 in your requirements.txt

Upvotes: 8

Related Questions