Create Application environment and deploy (application initial configuration with Elastic Beanstalk) - SethuGopalan/ebdjangoVR GitHub Wiki

Set up a Python virtual environment and install Django

Create a virtual environment with virtualenv and use it to install Django and its dependencies. By using a virtual environment, you can know exactly which packages your application needs, so that the required packages are installed on the Amazon EC2 instances that are running your application.

The following steps demonstrate the commands you must enter for Unix-based systems and Windows, shown on separate tabs.

To set up your virtual environment

  1. Create a virtual environment named eb-virt. For Windows Based System C:> virtualenv %HOMEPATH%\eb-virt For Unix Based System ~$ virtualenv ~/eb-virt

  2. Activate the virtual environment. For Windows Based System C:>%HOMEPATH%\eb-virt\Scripts\activate after Enter Prompt Come to (eb-virt) C:> For Unix based System ~$ source ~/eb-virt/bin/activate after Enter Prompt Come to (eb-virt) ~$

  3. Use pip to install Django. pip install Django==2.2

  4. To verify that Django is installed, enter the following. pip freeze