{ "cells": [ { "cell_type": "markdown", "id": "5f4ebab9-d59e-4b4b-8221-a5f481b403d0", "metadata": {}, "source": [ "## Setup\n", "\n", "\n", "### System structures\n", "\n", "To run PyJEM, you need Python and several supporting libraries (dependencies).\n", "Managing these can be complicated:\n", "\n", "**Problem without proper setup:**\n", "- Different Python projects need different versions of libraries\n", "- If library A needs version 1.0 and project B needs version 2.0 of the same library, they conflict\n", "- Installing libraries globally can break other projects\n", "\n", "**Solution: Use Miniconda + virtual environment (vjem)**\n", "\n", "```\n", "Your PC\n", "├── System Python (do NOT use for PyJEM)\n", "├── Miniconda (Python distribution with conda package manager)\n", "│ ├── vjem (isolated virtual environment)\n", "│ │ ├── Python 3.x\n", "│ │ ├── PyJEM\n", "│ │ ├── opencv-python\n", "│ │ ├── numpy\n", "│ │ └── ... (other dependencies)\n", "│ └── ... (other virtual environments)\n", "```\n", "\n", "**Benefits of this structure:**\n", "1. **Isolation**: PyJEM and its dependencies are contained in vjem. Other projects on your PC are unaffected.\n", "2. **Package management**: The `conda` package manager (in Miniconda) handles dependency conflicts automatically.\n", "3. **Reproducibility**: You can recreate the exact same environment on another PC.\n", "\n", "### Installation order\n", "The installation must follow this order because each step depends on the previous one:\n", "\n", "#### [Step 1: Install Miniconda](Miniconda.ipynb)\n", "- Miniconda provides the `conda` command, which you need to create virtual environments.\n", "- Without Miniconda, you cannot create the vjem environment.\n", "\n", "```\n", "PC → Miniconda (installed)\n", "```\n", "\n", "#### [Step 2: Install vjem(virtual environment)](vjem.ipynb)\n", "- Create a separate environment named “vjem” within the Miniconda environment you created in Step 1.\n", "- vjem is organized by Python version and includes its own Python interpreter and package space.\n", "- Without vjem, PyJEM would be installed globally and could conflict with other projects.\n", "\n", "```\n", "Miniconda → conda command → vjem (created)\n", "```\n", "\n", "#### [Step 3: Install PyJEM on vjem](PyJEM.ipynb)\n", "- You activate the vjem environment to use its isolated Python.\n", "- PyJEM will be installed within vjem. In some cases, dependency libraries may also be installed.\n", "- PyJEM can only be installed after vjem exists.\n", "\n", "```\n", "vjem (activated) → pip/conda install PyJEM → PyJEM ready to use\n", "```\n", "\n", "```{toctree}\n", ":maxdepth: 2\n", ":glob:\n", "\n", "Miniconda\n", "vjem\n", "PyJEM\n", "Appendix/index\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.0" } }, "nbformat": 4, "nbformat_minor": 5 }