Skip to content

Commit

Permalink
udpating installation documentation with python virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Apr 27, 2024
1 parent dddc925 commit 8c9762a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,29 @@ exit
```
Then proceed with to clone and install the software itself.

For running everything in a Virtual Python environment run:
```
apt-get install python3-venv
python3 -m venv /opt/CodeGrader_venv/
```

```
cd /opt
rm -r /opt/CodeGrader
git clone https://github.com/ooemperor/CodeGrader.git
cd CodeGrader
pip install -r ./codeGrader/frontend/requirements.txt
pip install -r ./codeGrader/backend/requirements.txt
/opt/CodeGrader_venv/bin/python3.11 -m pip install -r ./codeGrader/frontend/requirements.txt
/opt/CodeGrader_venv/bin/python3.11 -m pip install -r ./codeGrader/backend/requirements.txt
cd /opt/CodeGrader
mv setup_full.py setup.py
pip install .
/opt/CodeGrader_venv/bin/python3.11 -m pip install .
```

If you are running some Version of python higher than 3.9, it could be that there is an Error about Externally Managed python.
You can resolve this by running:
Everything that you run from right now on, that are scripts such as ```cgAddAdmin``` needs to be run from the python venv
with ```/opt/CodeGrader_venv/bin/cgAddAdmin```. This ensures proper execution within the Virtual Environment.

If you are running some Version of python higher than 3.9 without Virtual Environment, it could be that there is an Error about Externally Managed python.
You can resolve this by running (not recommended):
```
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
```
Expand Down

0 comments on commit 8c9762a

Please sign in to comment.