2

I am getting started on using Zappa. However, I already had installed python 3.7 on my computer while Zappa uses 3.6. I installed python 3.6.8, but when I try to use zappa in the cmd (zappa init) it uses python 3.7 by default. How can I direct zappa to use 3.6 instead?

2
  • If you are working on Linux or MacOS you can modify the PATH variable to python3.6 be on begin. Commented Mar 16, 2019 at 19:35
  • @GrzegorzBokota I'm on windows Commented Mar 16, 2019 at 19:41

3 Answers 3

3

As mentioned in Zappa README:

Please note that Zappa must be installed into your project's virtual environment.

You should use something like virtualenv to create a virtual environment, which makes it easy to switch Python version.

If you use virtualenv, you can try create an environment by:

$ virtualenv -p /usr/bin/python3.6 venv
$ source activate venv

Then pip install zappa in this virtual environment.

Sign up to request clarification or add additional context in comments.

Comments

0

I don't know about Zappa, but if you want use a specific version of python can do:

python3.6 my_program.py

and if whant use the command python with a specific version permanently, in linux modify the file /home/[user_name]/.bashrc and add the next line:

alias python=python3.6

Comments

0

You can use virtualenv to setup an environment using a specific Python version by:

% pip install virtualenv
% virtualenv -p python3.6 .venv

You can also use an absolute path to the Python executable if it's named the same but located in different folders.

Then switch to use the environment:

% source .venv/bin/activate

This environment uses Python 3.6, so install Zappa with pip like normal and you're good to go.

You can read more about usage of virtualenv here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.