-1

Oh no! An error occurred! :(

==============

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/zappa/cli.py", line 2693, in handle
    sys.exit(cli.handle())
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/zappa/cli.py", line 475, in handle
    self.init()
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/zappa/cli.py", line 1534, in init
    self.check_venv()
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/zappa/cli.py", line 2630, in check_venv
    "Learn more about virtual environments here: " + click.style("http://docs.python-guide.org/en/latest/dev/virtualenvs/", bold=False, fg="cyan"))
click.exceptions.ClickException: Zappa requires an active virtual environment!
Learn more about virtual environments here: http://docs.python-guide.org/en/latest/dev/virtualenvs/

==============

Need help? Found a bug? Let us know! :D
File bug reports on GitHub here: https://github.com/Miserlou/Zappa
And join our Slack channel here: https://slack.zappa.io
Love!, ~ Team Zappa!

Nic3500
  • 5,007
  • 10
  • 26
  • 33
  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example. – H. Pauwelyn Aug 29 '18 at 15:57
  • im not getting what u r trying to say – rahil shaikh Aug 29 '18 at 16:00
  • 3
    Please add some code and read [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – H. Pauwelyn Aug 29 '18 at 16:03
  • You are offering services or what? It is either an unclear question or publicity (== spam on this site). – Nic3500 Aug 29 '18 at 17:09

1 Answers1

2

Judging from the traceback, it seems you are not using virtual envs in your Zappa deployment. Zappa needs a virtual environment before you can deploy any AWS Lambda package.

Read more about how to create virtual environments here: https://virtualenv.pypa.io/en/stable/

So basically, on your project folder you will have to run:

(your project dir)$ pip install virtualenv
(your project dir)$ virtualenv venv
(your project dir)$ source venv/bin/activate
(your project dir)$ pip install requirements.txt
(your project dir)$ pip install zappa
(your project dir)$ zappa init
(your project dir)$ zappa deploy
bdbd
  • 111
  • 6