Install pip requirements as user 15/10715/2
authorbeierlm <mark.beierl@canonical.com>
Tue, 27 Apr 2021 18:33:24 +0000 (14:33 -0400)
committerbeierlm <mark.beierl@canonical.com>
Wed, 28 Apr 2021 08:51:14 +0000 (10:51 +0200)
Due to conflicting pyyaml versions at the system level, the osm
client needs to install its requirements.txt as user, not as root

Fixes bug 1510

Change-Id: I698a82837c259ecb8b531c7fb92a6e6bd659267e
Signed-off-by: beierlm <mark.beierl@canonical.com>
installers/full_install_osm.sh

index 321a794..11723fe 100755 (executable)
@@ -341,11 +341,11 @@ function install_osmclient(){
     sudo -H LC_ALL=C python3 -m pip install -U python-magic pyangbind verboselogs
     sudo apt-get install -y python3-osm-im python3-osmclient
     if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then
-        sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt
+        python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt
     fi
     if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then
         sudo apt-get install -y libcurl4-openssl-dev libssl-dev
-        sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
+        python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
     fi
     #sed 's,OSM_SOL005=[^$]*,OSM_SOL005=True,' -i ${HOME}/.bashrc
     #echo 'export OSM_HOSTNAME=localhost' >> ${HOME}/.bashrc