You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy a Django app with Zappa using. I have created virtualenv using pyenv.
Context
Following commands confirms the correct virtualenv
▶ pyenv which zappa
/Users/****/.pyenv/versions/zappa/bin/zappa
▶ pyenv which python
/Users/****/.pyenv/versions/zappa/bin/python
But when I am trying to deploy the application using zappa deploy dev following error is thrown
▶ zappa deploy dev
(pip 18.1 (/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages), Requirement.parse('pip>=20.1'), {'pip-tools'})
Calling deploy for stage dev..
Oh no! An error occurred! :(
==============
Traceback (most recent call last):
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/cli.py", line 2778, in handle
sys.exit(cli.handle())
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/cli.py", line 512, in handle
self.dispatch_command(self.command, stage)
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/cli.py", line 549, in dispatch_command
self.deploy(self.vargs['zip'])
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/cli.py", line 723, in deploy
self.create_package()
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/cli.py", line 2264, in create_package
disable_progress=self.disable_progress
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/core.py", line 627, in create_lambda_zip
copytree(site_packages, temp_package_path, metadata=False, symlinks=False, ignore=shutil.ignore_patterns(*excludes))
File "/Users/****/.pyenv/versions/3.6.9/envs/zappa/lib/python3.6/site-packages/zappa/utilities.py", line 54, in copytree
lst = os.listdir(src)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/****/mydir/zappa/env/lib/python3.6/site-packages'
==============
Expected Behavior
Zappa Should fetch packages from pyenv virtualenv
Actual Behavior
You can see the line at which error is thrown is different where virtualenv is installed. I don't know why Zappa deploy is looking for the site-packages here.
Possible Fix
Steps to Reproduce
Create Virtual env from pyenv 3.6.9
Install zappa and Django
deploy zappa application
Your Environment
Zappa version used: 0.52.0
Operating System and Python version: Mac and python 3.6.9 (installed from pyenv)
I'm going to close this as it's an old migrated issue.
If you are running zappa from within the associated venv, I don't think this should be a problem.
Originally from: Miserlou/Zappa#2206 by veris-neerajdhiman
I am trying to deploy a Django app with Zappa using. I have created virtualenv using pyenv.
Context
Following commands confirms the correct virtualenv
But when I am trying to deploy the application using zappa deploy dev following error is thrown
Expected Behavior
Actual Behavior
Zappa deploy
is looking for the site-packages here.Possible Fix
Steps to Reproduce
Your Environment
pip freeze
:zappa_settings.json
:The text was updated successfully, but these errors were encountered: