Sudo x chroot conflict in Ubuntu Core with Miniconda

I’m running a Raspberry on Ubuntu Core in snap classic and just installed Miniconda at chroot. I run the following commands to install Keras and Tensorflow:

export LC_ALL=C
sudo chmod -R a+rX /home/rubenszmm/miniconda3
sudo chown -R rubenszmm /home/rubenszmm/miniconda3
conda install scikit-learn

sudo apt-get install python3-numpy
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install python3-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install gfortran
sudo apt-get install python3-setuptools
sudo apt-get install python3-scipy
sudo apt-get update
sudo apt-get install python3-h5py



sudo apt-get install python-software-properties

cp /home/rubens/tensorflow-1.8.0-cp35-none-linux_armv7l.whl tensorflow-1.8.0-cp35-none-linux_armv7l.whl
easy_install pip==1.5.6 (8.1.1)
pip install numpy==1.14.5
sudo apt-get install python3-pip
sudo pip3 install tensorflow-1.8.0-cp35-none-linux_armv7l.whl

sudo pip3 install keras

Everything was successfully installed, but when I run:
… Machine Learning libraries were installed, but Keras and Tensorflow are not found.

When I run:
sudo python 3
Machine Learning libraries are not there, but it’s where keras and Tensorflow were installed. I get the following error:

ImportError: /usr/lib/arm-linux-gnueabihf/ version `GLIBCXX_3.4.22’ not found (required by /usr/local/lib/python3.5/dist-packages/tensorflow/python/

So far this has been an extenuous job, given that Ubuntu Core runs on an ARM processor and has only the most basic libraries in its OS.

Any ideas on what I can do to solve this issue ?

I solved the problem:

sudo apt-get install software-properties-common  
sudo apt-get install libstdc++6  
sudo add-apt-repository ppa:ubuntu-toolchain-r/test   
sudo apt-get update  
sudo apt-get upgrade  
sudo apt-get dist-upgrade