Yanukovich made his remarks in a speech marking Independence Day that also drew several thousand opposition supporters onto the streets of the capital in protest of his government's economic policies and Tymoshenko's imprisonment.
Yanukovich, midway through a five-year term in power in the former Soviet republic, said in a keynote address to government and church officials that he was committed to joining the European mainstream.
"But integration at any price in exchange for losing independence or for making economic or territorial concessions, or in exchange for allowing interference in our internal affairs - this is a path which we have never accepted and will never accept."
The Tymoshenko affair will be a major issue in the parliamentary election to be held on 28 October (see background), when Yanukovich's majority Party of the Regions faces a strong challenge from the united opposition.
The EU and the United States regard Tymoshenko, firebrand leader of the 2004 Orange Revolution street protests and a former prime minister, as the victim of selective justice and say her trial was politically motivated.
But Yanukovich, whose first bid for power was overturned by the Orange Revolution but who later went on to beat Tymoshenko in a bitter run-off for the presidency in 2010, has refused to secure her release and allow her to return to political life.
Tymoshenko was convicted last October of abuse of office in connection with a gas deal which she brokered with Russia in 2009 when she was prime minister. The Yanukovich government says it saddled Ukraine with exorbitant prices for strategic gas imports which are now impairing the economy.
Tymoshenko faces second trial
She is appealing against her conviction, but a second trial has been opened against her for alleged embezzlement and tax evasion.
Yanukovich, resorting to a tactic used by Ukrainian negotiators before, hinted that Ukraine might opt for tighter economic association with Russia and other former Soviet states if its path to integration with Europe proved too difficult.
"We must multilaterally develop cooperation with our CIS partners. After all that is where there is the biggest market for Ukrainian producers. We should not ignore the integration processes which are going on there," he said.
Despite frequently dropping the hint that it will turn to Russia if spurned by the EU, Ukraine has for several years rejected membership of a Russian-led customs union of ex-Soviet republics as an economic blueprint for the future.
Several thousand opposition protestors marched in Kiev on Friday to show their solidarity with Tymoshenko and to criticise government reforms, which have imposed higher taxes on small business and forced people to push back the age of retirement.
In an audio-recording from jail that was played at Friday's opposition rally, Tymoshenko appealed for uncompromising struggle against what she called "absolute evil" in the country.
"Do not leave our young country to the kleptocrats, the occupiers and dictators. Do not adapt yourself to their level of immorality. Do not betray yourselves or the country," she said.