I fail to see what disadvantages there are to not do it when looking at India's geographical location, economic potential, population, and many Indians are still traumatized from Western colonization making the task far easier.
The USSR didn't need to install a pro-Soviet government in India or make India an ally because for all intents and purposes it had a relatively pro-Soviet government and ally in India.
From 1962 to the end of the Cold War, the USSR was by far the biggest arms exporter to India (replacing the UK - US arms imports were practically nonexistent until the 21st century), and in turn India was one of, if not the, biggest Soviet arms importer outside of the Warsaw Pact. This was a convenient strategic balance at a time when Sino-Soviet relations worsened, and India was a strategic counterweight to China from the Soviet perspective. On top of this, India had a fairly large Communist Party (which is still around) that won state elections and ran the state government of Kerala, was the opposition party nationally in the 1950s, and supported Indira Gandhi in the 1970s.
Basically the USSR already had everything it could want from India (and imported lots of Indian films for Soviet consumption, by the way). India was a major player in the Non-Aligned Movement as well, so the USSR having close ties with the existing Indian government gave it credibility in the post-colonial world that it would not have if it engineered an overthrow of the existing government and replaced it with a Soviet puppet regime.
Installing an Indian Soviet Socialist Republic or what have you would also have provided very little tangible benefits and vastly increased Soviet liabilities, and in a country physically separated from the USSR, and with a very large development gap compared to the USSR or Eastern Bloc.
Historic arms import and export figures can be found at the SIPRI database.
Very short answer is: the Soviets didn't have the muscle to "install a pro-Soviet govt" in India. In fact, it would have been so far-fetched that it was never even considered in Moscow. India is a pretty big country to just swallow.
As for an alliance, while India leaned toward the Soviets from time to time, it's commitment to Nonalignment policy and its economic and ideological dependence on the US was too high for it to go all-out with Moscow.
Long answer: the Soviets had an eye on India as a potential theatre for revolution since the early 1920s. The founder of Communist Party of India, MN Roy was trained by the Soviets, a key figure in Comintern and close to the Politburo. However, during this period most of Soviet Asian program was focused on China, where they were first supporting Kuomintang and then battling it. India always remained the "next" destination.
After the Second World War and Indian independence in 1947, the power passed onto Nationalist Congress which had plenty of leaders with antipathy towards communism. Stalin denounced Congress as a Western stooge. Yet, despite this hostility, when Communist uprising started in Indian province of Telengana in 1948, Stalin didn't offer it too much support. He was too busy with Eastern Europe at the time. Congress govt successfully repressed the uprising through military means.
After Stalin's death, Moscow began to moderate its tone. They saw Nehru's Nonalignment as advantageous from their perspective for it kept large chunks of the Third World out of Western orbit. Soviets began to give India some aid although it is important to note that the Americans gave India far more in aid and thus were always an important factor in New Delhi's calculations. This shift in Soviet approach also meant tacit acceptance that India wasn't ripe for Communist takeover yet and the Indian Communists were left on their own. When another Communist uprising happened in Indian province of West Bengal in 1968, Moscow wasn't too interested.
By now there were new geopolitical reasons to be friendly with each other. After the India-China war of 1962 and Sino-Soviet border conflict in 1969, both India and USSR wanted to be close to each other to maintain some pressure on China. Also, as Washington drew closer to Pakistan under Nixon, New Delhi leaned towards the Soviets as a way to balance it. Before the 1971 India-Pakistan War, India and USSR signed a treaty of friendship (not an alliance). Both Moscow and New Delhi wanted to keep each other at an arm's length. Moscow didn't want to get dragged into India's War and New Delhi didn't want to antagonize the Amerocans any further.
But the situation was quickly corrected. Under Carter, India and the US reset their relationship. After that things were relatively unremarkable until the end of the Cold War. India sort of maintained a balanced approach towards both superpowers, all the while developing closer trade ties with both. Indians maintained good relationship with the Soviets because of historical reasons and to keep the Americans honest. But they also needed to keep Washington in good humor lest it turns completely towards Pakistan (this is when US and Pak are allied in the Afghan War).
when the Soviet Union started expanding its influence. Why didn't it target India and try and install a pro-soviet
This question can be answered in many ways . firstly it is important to remember that people who fought for independence of India was mostly British educated people. So they had exposure to tradition of liberalism. These people who fought for independence shaped the post - independence india. Like first prime minister of Nehru. Nehru was heavily influenced by Fabian socialism. On the other hand Gandhi influenced by cosmopolitan thoughts. So notion of communism wasn't a part of Mainstream political thinking. There was some scholars and freedom fighters like M .N Roy and ram manohar lohia who was influenced by Communism but in their work they have made many alterations in communism for the Indian context. So communism as an ideology was never really present in political sphere of India. And also in political culture.
Second thing is, Communism as an ideology to guide political sphere was too weak in Indian context. Telangana had a rebellion in 1948 but it was against Nizam (the king) it wasn't against the Indian state and Indian state later otherthow the nizam. So Indian state had the capacity to integrate different demands within democratic framework. There was also change of policy in ecomomic arena After the death of Nehru his daughter Indira Gandhi tried to liberalised the economy in 1966 (Mehta- Woods agreement) later her son Rajiv Gandhi also initiated those policies.
Thirdly in order to install a pro - government, state usually Target and uses the weakness of other state. In Indian case that weakness was Kashmir. But shaikh Abdullah was having meetings with American aaaars and ambassadors. Soviet Union tried to use it by declaring Kashmir as a part of India. But India under the prime ministership of Nehru managed to integrate Abdullah and his demands under the federal structure.
Also people are saying Soviet Union exported arms to India but India also got heavy aid from Washington and Washington based institutions especially during third five year plan .