The title of the page isn’t a hyperbole. If you have every tried to use Python beyond toy problems on Windows, you will have struggled with library clashes, 32/64 bit versions, ghost libraries (that seemed to be installed, but can’t be called).
As someone who uninstalled and reinstalled Python eight times in the last four weeks, let me tell you, getting Python working perfectly on Windows isn’t easy.
“But Mr T,” you say, “what’s the problem? You go to python.org and just download it. What’s the big deal?”
If you plan to just stick to solving Project Euler or other such toy problems, then the official site is good enough.
(Note: Lots of people have taken the previous sentence as an insult. It is not, and I apologise if it came out that way. All I meant was, in this day and age, it’s a shame there is no good packager for Python on Windows).
But I found that as soon as you try to do anything more complicated, like install libraries which need to be compiled (like numpy or scipy), the official build starts falling down. For my upcoming course on Python, I needed a lot of third party libraries, and I found that Python’s packaging system is really broken.
Here are some of the few Python versions I’ve tried:
1. The official from Python.org: Especially on Windows, this is good only for learning. I didn’t find it very stable, and even installing basic things like Virtualenv gave me problems.
2. The version from ActiveState: ActiveState have a version of Python, and it’s a lot more stable than the official version. It also makes it easy to install packages, and for a long time, this is what I used. But then I tried to install OpenCv, and got problems with versions. I decided to re-install Python, and that’s when I hit problems.
For some stupid reason, ActiveState install libraries in the C:\users\<name>\roaming\ region. These libraries take precedence over the local files (maybe due it being higher on the path hierarchy). Anyway, even after installing a different Python build (from Conda, see below), I kept getting library clashes which I couldn’t trace. I blamed Conda and spent weeks investigating obtuse error messages. I finally realised that ActiveState was to blame. The path to Python libraries must have been put in the registry or something, because even when I deleted the folders, it still looked for them in the Roaming folders.
I had to reinstall ActiveState Python, remove the libraries, and then uninstall it again.
Why am I telling you this? To show you how hard getting Python running can be on Windows. Recently, I discovered Anaconda, and that’s what I recommend now.
Based on the open source Conda packaging system, Anaconda is the best Python distribution I have found till now. For one, it comes with all the scientific libraries like numpy, scipy etc preinstalled, so you don’t have to worry about messing with compiling them yourself.
Second, it does not put important stuff in hidden folders (as far as I can see). Uninstalling it is easy and works.
Conda isn’t perfect, as I couldn’t get its environment system to work. But it’s a lot better than anything out there, and the only one I would recommend, at least on Windows
Stop struggling with Python on Windows. Avoid distributions with fancy install methods (I’m looking at you, ActiveState). Install the Anaconda build, preferably 32 bit (as some libraries aren’t available for 64 bit, and you will get library clashes).
PS: My book Python for Hackers is FREE for a short time (normally sells for $39). If you want it, enter your email below.
Subscribers will also get exclusive content I won't share on my blog.