Windows compatibility added.

This commit is contained in:
Lukas Klass 2020-07-13 15:25:55 +02:00
parent 017128a840
commit 838b53318f
2 changed files with 46 additions and 2 deletions

View File

@ -24,6 +24,9 @@ Python Virtual Environment
It is advisable to create a python virtual environment for ESBO-ETC where all necessary packages will be installed. It is advisable to create a python virtual environment for ESBO-ETC where all necessary packages will be installed.
To create a virtual environment and install all packages, got to the project's root directory an run To create a virtual environment and install all packages, got to the project's root directory an run
Linux / MacOS
^^^^^^^^^^^^^
.. code-block:: bash .. code-block:: bash
:linenos: :linenos:
@ -31,16 +34,41 @@ To create a virtual environment and install all packages, got to the project's r
source venv/bin/activate source venv/bin/activate
python venv/bin/pip install -r requirements.txt python venv/bin/pip install -r requirements.txt
Windows
^^^^^^^
It might be possible that you need to install `Microsoft Build Tools for C++ <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`_ in order to compile astropy.
.. code-block:: bash
:linenos:
conda create -n venv
conda activate venv
conda install -c anaconda pip
pip install -r requirements.txt
Global Python installation Global Python installation
-------------------------- --------------------------
Instead of a virtual environment, the global python installation can be used to run ESBO-ETC. Therefore, the necessary Instead of a virtual environment, the global python installation can be used to run ESBO-ETC. Therefore, the necessary
packages need to be installed by running the following command from the project's root directory. packages need to be installed by running the following command from the project's root directory.
Linux / MacOS
^^^^^^^^^^^^^
.. code-block:: bash .. code-block:: bash
:linenos: :linenos:
pip install -r requirements.txt pip install -r requirements.txt
Windows
^^^^^^^
.. code-block:: bash
:linenos:
conda install -c anaconda pip
pip install -r requirements.txt
================ ================
Running ESBO-ETC Running ESBO-ETC
================ ================
@ -59,13 +87,24 @@ The following options are available:
Shell-Script Shell-Script
------------ ------------
The recommended way to run ESBO-ETC is to use the provided shell-script which will add the project's root directory to The recommended way to run ESBO-ETC is to use the provided shell-script which will add the project's root directory to
the PATH-variable. However the shell-script only works for virtual environment installations. the PATH-variable. However the shell-script only works for virtual environment installations with the virtual environment named ``venv``.
Linux / MacOS
^^^^^^^^^^^^^
.. code-block:: bash .. code-block:: bash
:linenos: :linenos:
./run_esbo-etc [-h] [-c config.xml] [-l LOGGING] [-v] [-m] ./run_esbo-etc [-h] [-c config.xml] [-l LOGGING] [-v] [-m]
Windows
^^^^^^^
.. code-block:: bash
:linenos:
run_esbo-etc.bat [-h] [-c config.xml] [-l LOGGING] [-v] [-m]
Python Interpreter Python Interpreter
------------------ ------------------
An alternative way to start ESBO-ETC is by using the python interpreter from the command line. This method works for An alternative way to start ESBO-ETC is by using the python interpreter from the command line. This method works for
@ -74,7 +113,7 @@ both a virtual environment as well as for the global python installation. Launch
.. code-block:: bash .. code-block:: bash
:linenos: :linenos:
python3 esbo_etc/esbo-etc.py [-h] [-c config.xml] [-l LOGGING] [-v] [-m] python esbo_etc/esbo-etc.py [-h] [-c config.xml] [-l LOGGING] [-v] [-m]
================== ==================
Component Overview Component Overview

5
run_esbo-etc.bat Normal file
View File

@ -0,0 +1,5 @@
@echo off
call activate venv
python esbo-etc.py %*
call conda deactivate