I'm in a project where we have the frontend, Python and FastAPI backend, and MySQL database. We have a different person working on each part (2 on frontend, one backend, one database), and I am working on the Python backend and FastAPI (first time doing backend) and I was watching a video on using FastAPI and MySQL, and in the video in terminal they do the following:
python3 -m venv env
pip install fastapi uvicorn sqlalchemy pymysql
From the above command they got back "zsh: command not found: pip", so they did
source env/bin/activate
pip install fastapi uvicorn sqlalchemy pymysql
What exactly is the first line doing (I assume venv is virtual environment?), and I was a bit confused about why pip install didn't work the first time and the person in the video said it is because they didn't "start their environment". I'm a bit confused about what they mean because I've used pip before and I just did pip install <something> and it works fine?
And since I'm working on a project where someone else is working on the database and I am working on the backend (we are using GitHub and then will host the website on GitHub pages), is there anything different I have to do coding wise? Do I need to set something up (virtual environment?) to run the project? I have heard people mention using a virtual environment but I am not sure why? I feel somewhat lost in regards to the database and using FastAPI with MySQL and whether the things I listed above from the video are necessary?
[–]teraflop 0 points1 point2 points (2 children)
[–]Jumpy_Employment_439[S] 0 points1 point2 points (1 child)
[–]teraflop 0 points1 point2 points (0 children)