Skip to content

Commit 63330a8

Browse files
Update Manual Setup Guide to include Miniconda installation instructions (#971)
1 parent 4647bac commit 63330a8

File tree

1 file changed

+51
-32
lines changed

1 file changed

+51
-32
lines changed

docs/Manual_Setup_Guide.md

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@ cd PictoPy
2424
git remote add upstream https://github.com/AOSSIE-Org/PictoPy
2525
```
2626

27+
### Prerequisites:
28+
29+
#### Install and Setup Miniconda
30+
31+
Before setting up the Python backend and sync-microservice, you need to have **Miniconda** installed and set up on your system.
32+
33+
1. **Download and Install Miniconda:**
34+
- Visit the [Miniconda installation guide](https://www.anaconda.com/docs/getting-started/miniconda/install#quickstart-install-instructions)
35+
- Follow the quickstart install instructions for your operating system
36+
- Make sure `conda` is available in your terminal after installation
37+
38+
2. **Verify Installation:**
39+
```bash
40+
conda --version
41+
```
42+
You should see the conda version number if installed correctly.
43+
2744
### Tauri Frontend Setup:
2845

2946
1. **Install Tauri prerequisites based on your OS using this** [guide](https://tauri.app/start/prerequisites/).
@@ -43,7 +60,7 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
4360

4461
### Python (FastAPI) Backend Setup Steps:
4562

46-
> **Note:** For backend setup make sure that you have **Python version 3.12**. Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
63+
> **Note:** For backend setup make sure that you have **Miniconda installed** (see Prerequisites section above). Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
4764
4865
1. **Navigate to the Backend Directory:** Open your terminal and use `cd` to change directories:
4966

@@ -53,47 +70,47 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
5370
cd backend
5471
```
5572
56-
2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:
73+
2. **Create a Conda Environment:** Create a new conda environment with Python 3.12:
5774
58-
Bash(Linux/MacOS)
75+
Bash/Powershell
5976
6077
```
61-
python3 -m venv .env
78+
conda create -n .env python=3.12
6279
```
6380
64-
Powershell(Windows)
81+
3. **Activate the Conda Environment:**
82+
83+
Bash/Powershell
6584
6685
```
67-
python -m venv .env
86+
conda activate ./.env
6887
```
6988
70-
3. **Activate the Virtual Environment:**
89+
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:
7190
72-
Bash(Linux/MacOS)
91+
Bash (Linux/MacOS)
7392
7493
```
75-
source .env/bin/activate
94+
export PATH="$CONDA_PREFIX/bin:$PATH"
7695
```
7796
78-
Powershell(Windows)
97+
Powershell (Windows)
7998
8099
```
81-
.env\Scripts\Activate.ps1
100+
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
82101
```
83102
84-
After activating, you should be able to see the virtual environment's name before the current path. Something like this:
103+
After activating, you should be able to see the conda environment's name before the current path.
85104
86-
![alt text](/docs/assets/screenshots/virtualEnv.png)
105+
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
87106
88-
4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
89-
90-
Bash
107+
Bash/Powershell
91108
92109
```
93110
pip install -r requirements.txt
94111
```
95112
96-
5. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the virtual environment activated:
113+
6. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the conda environment activated:
97114
98115
Bash/Powershell
99116
@@ -107,7 +124,7 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
107124
108125
### Sync-Microservice Setup Steps:
109126
110-
> **Note:** For sync-microservice setup make sure that you have **Python version 3.12**. Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
127+
> **Note:** For sync-microservice setup make sure that you have **Miniconda installed** (see Prerequisites section above). Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
111128
112129
1. **Navigate to the Sync-Microservice Directory:** Open your terminal and use `cd` to change directories:
113130
@@ -117,45 +134,47 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
117134
cd sync-microservice
118135
```
119136
120-
2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:
137+
2. **Create a Conda Environment:** Create a new conda environment with Python 3.12:
121138
122-
Bash(Linux/MacOS)
139+
Bash/Powershell
123140
124141
```
125-
python3 -m venv .sync-env
142+
conda create -n .sync-env python=3.12
126143
```
127144
128-
Powershell(Windows)
145+
3. **Activate the Conda Environment:**
146+
147+
Bash/Powershell
129148
130149
```
131-
python -m venv .sync-env
150+
conda activate ./.sync-env
132151
```
133152
134-
3. **Activate the Virtual Environment:**
153+
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:
135154
136-
Bash(Linux/MacOS)
155+
Bash (Linux/MacOS)
137156
138157
```
139-
source .sync-env/bin/activate
158+
export PATH="$CONDA_PREFIX/bin:$PATH"
140159
```
141160
142-
Powershell(Windows)
161+
Powershell (Windows)
143162
144163
```
145-
.sync-env\Scripts\Activate.ps1
164+
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
146165
```
147166
148-
After activating, you should be able to see the virtual environment's name before the current path.
167+
After activating, you should be able to see the conda environment's name before the current path.
149168
150-
4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
169+
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
151170
152-
Bash
171+
Bash/Powershell
153172
154173
```
155174
pip install -r requirements.txt
156175
```
157176
158-
5. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the virtual environment activated:
177+
6. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the conda environment activated:
159178
160179
Bash/Powershell
161180

0 commit comments

Comments
 (0)