#!/bin/bash python3 -c "import numpy" if [ $? ]; then echo Numpy needs to be installed sudo apt-get python3-numpy fi echo Everything is properly installed
This is what I'm trying to run.
Supposedly, it checks if numpy is already installed and if not, install it. However, it installs everytime, even though I already have it.
When I change import numpy to import asdfas it still installs numpy, so the if is not doing anything at all!
I'm sorry if this is already answered, but my google search didn't find this specific error