Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not recognizing virtaulenv created with pyenv. #1132

Closed
iml1111 opened this issue May 10, 2022 · 1 comment
Closed

Not recognizing virtaulenv created with pyenv. #1132

iml1111 opened this issue May 10, 2022 · 1 comment
Assignees
Labels
bug Something isn't working next-release-candidate

Comments

@iml1111
Copy link
Contributor

iml1111 commented May 10, 2022

Context

If .python-version does not exist in the current path, the virtual environment of pyenv is not recognized.

Expected Behavior

> zappa update dev
Calling update for stage dev..
Downloading and installing dependencies..
...

Actual Behavior

# .python-version is not in that path, but pyenv works correctly.
> pwd
/Users/username/Documents/GitHub/myenv/myproject
> pyenv versions
* my-env (set by /Users/username/Documents/GitHub/my-env/.python-version)
...

> zappa update dev
Calling update for stage dev..
Error: Zappa requires an active virtual environment!
Learn more about virtual environments here: http://docs.python-guide.org/en/latest/dev/virtualenvs/

Possible Fix

In addition to detecting the .python-version file in the current path, you can check the current virtual environment by using the pyenv version command.

Steps to Reproduce

Your Environment

  • Zappa version used: 0.54.1
  • Operating System and Python version: 3.9.12
  • The output of pip freeze:
argcomplete==2.0.0
awscli==1.22.87
boto3==1.21.32
botocore==1.24.32
certifi==2021.10.8
cfn-flip==1.3.0
charset-normalizer==2.0.12
click==8.1.2
colorama==0.4.3
docutils==0.15.2
durationpy==0.5
Faker==13.3.4
Flask==2.1.1
flask-validation-extended==0.1.7
future==0.18.2
hjson==3.0.2
idna==3.3
importlib-metadata==4.11.3
itsdangerous==2.1.2
Jinja2==3.1.1
jmespath==1.0.0
kappa==0.6.0
MarkupSafe==2.1.1
placebo==0.9.0
pyasn1==0.4.8
python-dateutil==2.8.2
python-dotenv==0.20.0
python-slugify==6.1.1
PyYAML==5.4.1
requests==2.27.1
rsa==4.7.2
s3transfer==0.5.2
six==1.16.0
slack-sdk==3.15.2
text-unidecode==1.3
toml==0.10.2
tqdm==4.64.0
troposphere==4.0.0
urllib3==1.26.9
Werkzeug==2.1.1
wsgi-request-logger==0.4.6
zappa==0.54.1
zipp==3.8.0
  • Link to your project (optional): I don't think this is necessary.
  • Your zappa_settings.json: I don't think this is necessary.
@monkut
Copy link
Collaborator

monkut commented Dec 1, 2022

released in 0.56.0, closing.

@monkut monkut closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next-release-candidate
Projects
None yet
Development

No branches or pull requests

2 participants