From 8433c8162a84bbe72d637f0e19836403586add78 Mon Sep 17 00:00:00 2001
From: karnem <mikhail.karnevskiy@desy.de>
Date: Mon, 6 Jan 2020 15:03:37 +0100
Subject: [PATCH] Add installation to vertual env

---
 README.rst      | 35 +++++++++++++++++++++++++++++++++++
 bin/activate.sh |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/README.rst b/README.rst
index 4fba76a33..a251c3a4a 100644
--- a/README.rst
+++ b/README.rst
@@ -35,6 +35,41 @@ After installation, you should make sure that the home directory is in the PATH
 
     4. export PATH=$HOME/.local/bin:$PATH
 
+Installation using virtual python environment
+---------------------------------------------
+
+Create virtual environment::
+
+    module load anaconda/3
+    python -m venv /path/to/new/virtual/environment
+    source /path/to/new/virtual/environment/bin/activate
+
+Clone from git::
+
+    cd /path/to/packages
+    git clone https://git.xfel.eu/gitlab/detectors/pycalibration.git
+    cd pycalibration
+
+Edit path to the python environment in the bin/activate.sh file. Change::
+
+    export PATH=/home/${USER}/.local/bin:$PATH
+
+to::
+
+    export PATH=/path/to/new/virtual/environment/bin:$PATH
+
+Install the package::
+
+    pip install -r requirements.txt
+
+In additional install pyDetLib package, which is required for many notebooks::
+
+    cd /path/to/packages
+    git clone https://git.xfel.eu/gitlab/karaboDevices/pyDetLib.git
+    cd pyDetLib/lib
+    pip install -r requirements.txt
+    pip install .
+
 
 Development Installation
 ------------------------
diff --git a/bin/activate.sh b/bin/activate.sh
index 359a3df5c..9584c3b78 100644
--- a/bin/activate.sh
+++ b/bin/activate.sh
@@ -2,4 +2,4 @@ source /etc/profile.d/modules.sh
 module load anaconda/3
 module load texlive
 # export path to python environment
-export PATH=$HOME/.local/bin:$PATH
+export PATH=/home/${USER}/.local/bin:$PATH
-- 
GitLab