for module in pip_modules : modend = module . find ( '=' ) newmod = module [: modend ] # Make sure only module name is being called #print(newmod) ! pip install -U $newmod