---
# System prepended metadata

title: '1. Install different versions of Python (3.8 - 3.10), ex. with pyenv'

---

# 1. Install different versions of Python (3.8 - 3.10), ex. with pyenv

# 2. Create the envs

## venv
```
python3.8 -m venv mtmod3_py3.8
python3.9 -m venv mtmod3_py3.9
python3.10 -m venv mtmod3_py3.10
```

```
source mtmod3_py3.7/bin/activate
source mtmod3_py3.8/bin/activate
source mtmod3_py3.9/bin/activate
source mtmod3_py3.10/bin/activate
```
```
python3.8 -m venv mtmod4_py3.8
python3.9 -m venv mtmod4_py3.9
python3.10 -m venv mtmod4_py3.10
```

```
source mtmod4_py3.7/bin/activate
source mtmod4_py3.8/bin/activate
source mtmod4_py3.9/bin/activate
source mtmod4_py3.10/bin/activate
```

## conda
```
conda create --name mtmod4_py3.7 python=3.7 
conda create --name mtmod4_py3.8 python=3.8 
conda create --name mtmod4_py3.9 python=3.9 
conda create --name mtmod4_py3.10 python=3.10 

conda env remove -n ENV_NAME
```

# Install packages within every v env

## General commands

```
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
```

# Justin: install test script
```
python3.8 -m venv mtmod4_py3.8
python3.9 -m venv mtmod4_py3.9
python3.10 -m venv mtmod4_py3.10
conda create --name mtmod4_py3.8 python=3.8 
conda create --name mtmod4_py3.9 python=3.9 
conda create --name mtmod4_py3.10 python=3.10 

source mtmod4_py3.8/bin/activate
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
deactivate

source mtmod4_py3.9/bin/activate
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
deactivate

source mtmod4_py3.10/bin/activate
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
deactivate

conda activate mtmod4_py3.8
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
conda deactivate

conda activate mtmod4_py3.9
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
conda deactivate

conda activate mtmod4_py3.10
python -m pip install -r requirements.txt --no-cache-dir
python -m pip install -r requirements.extra.txt --no-cache-dir
python -m pip install -Ue . --no-cache-dir
conda deactivate
```
# Justin: copying files
Files
```
python sync_previous_module.py mle-module-3-justinchiu mle-module-4-justinchiu
```

# Justin: After copying fill-me-ins
```
```




