.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/prep/ex_prep_02_setup.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_prep_ex_prep_02_setup.py: Preparing Python Environment ============================ The basic steps are: 1. Create a requirements file. 2. Install a new virtual environment (pycx). - Load the virtual environment. - Install libraries. - Unload the virtual environment. 3. Reload Make requirements.txt ''''''''''''''''''''' Below is a bash command that makes a requirements.txt .. code-block:: bash cat << EOF > requirements.txt netCDF4>=1.5.8,!=1.7.0,!=1.7.1 pseudonetcdf>=3.5 numpy>=1.19.5,<2 scipy>=1.5.4 pandas>=1.1.5 xarray>=0.16.2 pyproj>=2.6.1 pycno pyrsig>=0.12.0 cmaqsatproc>=0.5.2 EOF Install a new virtual environment ''''''''''''''''''''''''''''''''' - Make a new virtual environment (pycx) - Load the virtual environment. - Install libraries. - Unload virtual environment (optional) .. code-block:: bash python3 -m venv pycx source pycx/bin/activate python -m pip install -r requirements.txt deactivate Reload Environemnt '''''''''''''''''' Any time you want to use the python environment, load it. .. code-block:: bash source pycx/bin/activate The environment will stay active until you either run deactivate or logout. .. _sphx_glr_download_auto_examples_prep_ex_prep_02_setup.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: ex_prep_02_setup.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: ex_prep_02_setup.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: ex_prep_02_setup.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_