To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit f065aead authored by Xuqian Yan's avatar Xuqian Yan
Browse files

Updated readme for virtualenv (as an alternative to conda)

parent ad3942dc
This documentation is shown on <https://nexus-e.readthedocs.io/en/latest/>. This documentation is shown on <https://nexus-e.readthedocs.io/en/latest/>.
How to compile the whole documentation locally: How to compile the whole documentation locally:
- install [Anaconda](https://docs.anaconda.com/anaconda/install/) - (Only need to do it once) Create a python virtual environment for better python package management
- create a virtual environment for better python package management. Here are example codes using conda: - Option 1: use [conda](https://conda.io/projects/conda/en/latest/index.html)
- conda create -n **nexuse-doc** python=3.7 (you can change the "nexuse-doc" to any name for the virtual environment; the python version should be aligned with the version specified in docs/.readthedocs.yml) - install conda following [this instruction](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)
- conda activate **nexuse-doc** - `conda create -n nexuse-doc python=3.7` (you can change the "nexuse-doc" to any name for the virtual environment; the python version should be aligned with the version specified in [docs/.readthedocs.yml](https://gitlab.ethz.ch/nexus-e/nexuse-doc/-/blob/master/docs/.readthedocs.yml))
- cd to "docs" folder of this repository - `conda activate nexuse-doc`
- pip install -r "requirements.txt" - `cd` to the "docs" folder of this repository
- make html - `pip install -r requirements.txt`
- open build/html/index.html - Option 2: use [virtualenv](https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/)
- Webpage will be shown in the browser - `pip install virtualenv`
- `cd` to the repository
- `virtualenv -p python3.7 venv` (The python version should be aligned with the version specified in [docs/.readthedocs.yml](https://gitlab.ethz.ch/nexus-e/nexuse-doc/-/blob/master/docs/.readthedocs.yml).)
- (On Mac or Linux) `source venv/bin/activate` or (on Windows) `venv\Scripts\activate.bat`
- `cd` to the "docs" folder of this repository
- `pip install -r requirements.txt`
- Once you have created a virtual environment
- Activate the virtual environment, with one of the following commands
- (for conda environment) `conda activate nexuse-doc`
- (for virtualenv on Mac or Linux) `source venv/bin/activate`
- (for virtualenv on Windows) `venv\Scripts\activate.bat`
- `make html`
- `open build/html/index.html`
- Webpage will be shown in the browser
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment