<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Setting python version as default on Linux]]></title>
	<link>https://bioinformaticsonline.com/blog/view/37627/setting-python-version-as-default-on-linux?</link>
	<atom:link href="https://bioinformaticsonline.com/blog/view/37627/setting-python-version-as-default-on-linux?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/37627/setting-python-version-as-default-on-linux</guid>
	<pubDate>Tue, 04 Sep 2018 10:15:47 -0500</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/37627/setting-python-version-as-default-on-linux</link>
	<title><![CDATA[Setting python version as default on Linux]]></title>
	<description><![CDATA[<p>If you have a later version than 2.6 you'll need to set 2.6 as the default Python. Later versions would be 2.7 and 3.1; see what you have by typing</p><pre>python -V
</pre><p><span>at the terminal. For purposes of this example we'll assume you have 3.1 installed. You'll next need to execute the following commands:</span></p><p>&nbsp;</p><pre>sudo apt-get install python2.6 idle-python2.6
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.1 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 10
sudo update-alternatives --config python
</pre><p>This last command will allow you to choose which version of python to use by default. If you have done everything above correctly, python2.6 should already be set as the default. If it is not, choose it to be the default. From now on, running python should start version 2.6.</p><div><p>Undoing These Changes</p><p>In some cases (e.g., installing or updating certain packages), you'll get an error message if you've run the commands above. To update these packages, you'll have to temporarily undo these changes. Here's how to do that:</p><pre>sudo update-alternatives --remove-all python
sudo ln -s python3.1 /usr/bin/python
</pre><p>Once you're done updating these packages, execute the commands at the top to set python2.6 as the default again.</p></div>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>

</channel>
</rss>