Skip to content

Commit

Permalink
Add instructions for virtual environment (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Traub <traubd@amazon.com>
  • Loading branch information
DennisTraub and DennisTraub authored Nov 9, 2023
1 parent 5fc3be3 commit 05483e7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
__pycache__/

**/venv/
**/.venv/
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@ Open a terminal, navigate to a directory of your choice, and execute the followi
git clone https://github.com/build-on-aws/python-fm-playground.git
```

### Backend Setup
### Virtual Environment Setup

It's recommended to use a virtual environment for your Python projects to manage dependencies separately for each project. If you're not already in a virtual environment, navigate to the project directory to create and activate the virtual environment:

```shell
# Windows:
cd python-fm-playground
python -m venv .venv
.venv\Scripts\activate
```

**Note:** It's a good practice to use a virtual environment for your Python projects to manage dependencies separately for each project. If you're not already in a virtual environment, [you can create one and then install your packages there](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).
```shell
# Linux/MacOS
cd python-fm-playground
python -m venv .venv
source .venv/bin/activate
```

### Backend Setup

In the `python-fm-playground/backend` directory, run:
Navigate to the `backend` directory and run:

```shell
pip install -r requirements.txt
Expand Down Expand Up @@ -74,6 +90,20 @@ In the terminal where the frontend is running, press `Ctrl + C` to terminate the

Similarly, in the backend terminal, use the `Ctrl + C` shortcut to stop the server.

### Deactivating the Virtual Environment

To deactivate the virtual environment, you can simply close the backend terminal, or execute the following command:

```shell
# Windows:
.venv\Scripts\deactivate.bat
```

```shell
# Linux/MacOS
deactivate
```

If you encounter any issues, you can forcefully terminate the processes by finding the process ID (`PID`) and using the `kill` command on Unix-based systems or Task Manager on Windows.


Expand Down
36 changes: 0 additions & 36 deletions frontend/README.md

This file was deleted.

0 comments on commit 05483e7

Please sign in to comment.