You will need to have a working GNU Radio installation to use gr-osmosdr. Many Linux distributions provide it through their package manager, or you can install it using GNU Radio's PyBOMBS system (https://github.com/gnuradio/pybombs). If you're using PyBOMBS, note that you may need to use "pybombs run" to ensure the environment is set up correctly when running your script.