Using a canal/aqueduct system for hydroelectric power rather than a dam
The hydroelectric power extracted by a river dam is related to the height of the water at the dam (with greater heights translating to higher water pressure at the bottom of the dam, and so more hydroelectric power), as well as to the river flow rate (the volume of water per minute flowing down the river at the dam location).
With this water height and water flow rate in mind, why not just tap the river several miles upstream, and run the river's water near horizontally along the mountain sides of the valley (via a horizontal canal or aqueduct built into the mountain side), and then some miles downstream, let this channelled water cascade down some large-bore vertical pipes, at the bottom of which you place hydroelectric turbines.
The water pressure and water flow rate at the bottom of the vertical pipes should be similar to that created by the dam. So a comparable amount of hydroelectric power could be extracted by this canal/aqueduct system.
The advantage of this canal/aqueduct approach is that you will not change the local environment like a dam does (via flooding the area behind the dam). And you do not have the hazard of a dam failure, which can lead to great damage to buildings and a loss of life.