Try adding .cabal/bin to the path to see if cabal upgrade can work