Change Python Version

By  on  

Python plays a major role at Mozilla; much of our website backends and tooling are written in the powerful language.  Want to build Firefox?  You'll need to make sure you have the proper Python version, which I recently found out had been upgraded.

Despite installing and verifying I had the version of python I needed, the default version was still an older version and the build was failing.  I know that there are python version managers and symlinking tricks, but I wanted the easiest and most explicit possible way to set a default python version, and I did it with an entry to ~/.bash_profile:

alias python='python3'

The directive above sends python calls to python3 and thus I can specify the python version with this entry.  There are many ways to accomplish this goal but this one works great for me!

Recent Features

  • By
    fetch API

    One of the worst kept secrets about AJAX on the web is that the underlying API for it, XMLHttpRequest, wasn't really made for what we've been using it for.  We've done well to create elegant APIs around XHR but we know we can do better.  Our effort to...

  • By
    5 Ways that CSS and JavaScript Interact That You May Not Know About

    CSS and JavaScript:  the lines seemingly get blurred by each browser release.  They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely.  We have our .js files and our .css, but...

Incredible Demos

Discussion

  1. Woah awesome idea. I will also go for it. Keep sharing such ideas to bring some awareness in users. Thank you

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!