Skip to content
Browse files
Survey results
Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Sep 26, 2015
1 parent 31bc4a5 commit b556039af429e9cea84afabf0904837eaa071d5e
Showing 3 changed files with 138 additions and 8 deletions.
@@ -0,0 +1,130 @@
.. title: Environment Survey Results and the Future of Python 2.7 in Nikola
.. slug: env-survey-results-and-the-future-of-python-27
.. date: 2015-09-26 10:00:00 UTC
.. tags: python, survey, planet
.. category:
.. link:
.. description:
.. type: text
.. author: Chris Warrick
Recently, the Nikola team `asked the community`__ about the Python versions used to run Nikola. We received a total of 138 responses. The survey results are as follows:

Most users already are on Python 3

Two thirds (66%) of Nikola users are already on Python 3. Some users run both versions concurrently (for example, on different operating systems)

.. chart:: Pie
:title: 'Python 2 and 3 users'

'Python 2 only', 46
'Python 3 only', 73
'Python 2 and 3', 19

A diverse selection of operating systems

The most popular operating system is Ubuntu (with 54 users), followed by Debian and Mac OS X (37 users each). There were also 27 Windows users taking part in the survey. This was a multiple–choice question — there were 211 data points in total)

There are multiple operating system versions listed in the second (optional) question about operating systems, ranging from Debian 6 squeeze (oldstable) to the newest versions

.. chart:: Bar
:title: 'Operating systems used by survey participants'

'Ubuntu', 54
'Debian', 37
'Mac OS X', 37
'Windows', 27
'Arch Linux', 20
'BSD', 9
'Linux Mint', 8
'Fedora', 7
'RedHat/CentOS', 3
'openSUSE', 3
'Gentoo', 2
'Other', 4

Switching is not a problem for the community

Out of all the participants, only 10 (7.25%) said that they would not install a Python 3 interpreter, even if Nikola were to require one. More than 76% of our users have a Python 3 interpreter installed already.

.. chart:: Pie
:title: 'Python 3 interpreter usage'

'Have a Python 3 interpreter', 106
'Can install Python 3 if required', 22
'Refuse to install Python 3', 10

Comments, concerns and suggestions

After answering the four survey questions, users could leave comments. Many of them were positive and commended the decision. Some participants even claimed that they do not like Python 2.x and it might even deter them from contributing. Many participants asked us to kill 2.7 and to go forward with Python 3.

There were, however, a few participants that had concerns about our decision. A few users cited the inability to migrate due to having existing Python 2-only software. For most people, this is not a problem — Python 2 and 3 can **coexist** on one machine, with separate packages and binaries. Those users would be just use Nikola with Python 3.x, and their legacy software with 2.7 — and it would work without any problems. The only people who could have a problem are those using 2.7–only code in plugins.

Some users also suggested bundling an interpreter with Nikola (this is done by eg. Dropbox). We believe that this is not a good thing to do. Bundling an interpreter is a lot of work, and Dropbox does this because they want to protect their code (not applicable in an open–source project) and because they have a large non-technical user base (who is scared by black terminal windows used by h4x0rz). However, there is a partial solution: if you prefer, you can use a `Docker image`__ that runs Nikola under Arch Linux, created by Rob Brewer (and which has been blessed by the Nikola team).

Yet another suggestion was to make Nikola available via Homebrew or MacPorts. While there is no package for Nikola available in those repositories, our `Getting Started Guide`__ recommends using Homebrew, MacPorts or Fink with virtualenv and pip on OS X, by providing install instructions for those three repositories (using Python 3). If you want a package for one of those systems, you can always contribute your own (if this is possible in those communities) — the Nikola community will be happy to use it.

There were also concerns about the ARM architecture. We have had reports of users running Nikola on ARM–based devices (including one survey participant) — just keep in mind that it is really slow on SD cards (which is the main storage device of Raspberry Pi).

The future of Python 2.7 in Nikola

Taking the results of this survey into consideration, the Nikola developers decided that Python 2.7 support will be **dropped in Nikola v8.0.0**. This version will be released in early 2016. Before that date, we will migrate all our remaining infrastructure to Python 3.x. The next version of Nikola, v7.7.2, will be released on 2015-10-03 and will display a warning if the user is running Python 2.7. We might keep the compatibility hacks after v8.0.0, but we will not officially support using Python 2.7 with Nikola.

Switching to Python 3.x

If you are running Nikola with Python 2.7, you should switch to Python 3.x soon. Doing so is simple and is a one–time process. You should follow the `Getting Started Guide`__ for more information, or read the instructions below:


1. Install Python 3.5 from the official website (``__)
2. Install virtualenv using ``py -m pip install virtualenv``
3. Create a virtualenv and activate it (for more information, read `virtualenv documentation`__)
4. Install lxml and Pillow wheels from `Christoph Gohlke’s website`__ (using ``pip install c:\paths\to\the\two\files.whl``)
5. Install Nikola using ``pip install "Nikola[extras]"``

Mac OS X

Follow the “Installing on OS X” section of the `Getting Started Guide`__ to install Nikola and Python from Homebrew, MacPorts or Fink.


To install Nikola using Python 3.x on Linux, you should first identify your installation method.

If you use a distribution package (eg. ``python-nikola`` from Arch Linux’s AUR, or Fedora’s packages), you should look for the Python 3 version of those packages. If those are not available, you should install Nikola manually and report a bug with your distribution.

If you installed Nikola manually, we recommend creating a virtualenv for it. Please follow the instructions in the `Getting Started Guide`__ (you might need to see the troubleshooting hints and adjust them for your OS/Python 3 package name)

(Note that Nikola requires Python 3.3 or newer; if you are running a *really* old distribution, it might not be available.)

Migrating a site

You can use your existing Nikola site with Python 3, without any special modifications to the code. However, you will likely receive this error when you run ``nikola build`` for the first time::

doit.dependency.DatabaseException: Dependencies file in '.doit.db' seems to use an old format or is corrupted.
To fix the issue you can just remove the database file(s) and a new one will be generated.

In case you do, you can just remove the mentioned ``.doit.db`` file and run ``nikola build`` again. Note that this will lead to rebuilding your site from scratch — but this is a **one–time process**, and the next rebuild should be an incremental one.

PS. you can also see the results on the Google Forms `results`__ summary page. If you want to do your own data analysis, we can share the raw data (.csv) — contact me (Chris Warrick) if you would like to get access. The charts in this post were generated courtesy of `pygal`__, using the ``:chart:`` directive, which is built into Nikola.

@@ -10,7 +10,7 @@
.. author: The Nikola Team

<p class="lead">Setting up a Nikola site is really easy. You will need a few minutes’ time and a Python (2.7+/3.3+) interpreter.</p>
<p class="lead">Setting up a Nikola site is really easy. You will need a few minutes’ time and a Python (3.3+; 2.7 partially supported) interpreter.</p>
<div class="row">
<h2 id="install">Step 1. Install Nikola</h2>
<div class="col-md-7">
@@ -31,7 +31,7 @@ <h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#ac
<div class="panel-body">
<p>Nikola supports Windows! Keep in mind, though, that there are some caveats:</p>
<ol class="arabic simple">
<li>You need to install <a href="">Python</a> first. You also need to install virtualenv if you want to use it: <code class="gs-code gs-command">pip install virtualenv</code></li>
<li>You need to install <a href="">Python</a> first. You also need to install virtualenv if you want to use it: <code class="gs-code gs-command">py -m pip install virtualenv</code></li>
<code class="gs-code">lxml</code> and <code class="gs-code">Pillow</code> require compiled extensions. Compiling them on Windows is hard for most people. Fortunately, compiled packages exist. Check their <a class="reference external" href="">PyPI</a> pages to find official packages, use <a class="reference external" href="">the unofficial wheels by Christoph Gohlke</a>, or get them somewhere else.
@@ -86,7 +86,7 @@ <h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse
<div class="panel-body">
<p>Nikola is packaged for some Linux distributions, you may get that instead of installing via <code class="gs-code">pip</code>. Keep in mind that those packages might be <strong>outdated</strong> and that we don’t support versions that are too old. Proceed with care!</p>
<ul class="simple">
<li>Arch Linux (AUR): <a class="reference external" href="">python-nikola</a> / <a class="reference external" href="">python2-nikola</a> for the latest stable release or <a class="reference external" href="">python-nikola-git</a> / <a class="reference external" href="">python2-nikola-git</a> for the GitHub master. (official Nikola-supported packages)
<li>Arch Linux (AUR): <a class="reference external" href="">python-nikola</a> for the latest stable release or <a class="reference external" href="">python-nikola-git</a> for the GitHub master. (official Nikola-supported packages)
<li>Fedora: <a class="reference external" href="">python-nikola</a> (incl. python3-nikola)
@@ -107,15 +107,15 @@ <h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse
<p>If you get an error to the effect of <code class="gs-code">Python.h not found</code>, you need to install development packages for Python.</p>
<p>Debian systems:</p>
<pre class="gs-console">
<code># <span class="gs-root">sudo apt-get install python-dev</span></code>
<code># <span class="gs-root">sudo apt-get install python3-dev</span></code>
<p>Fedora 22+:</p>
<pre class="gs-console">
<code># <span class="gs-root">sudo dnf install python-devel</span></code>
<code># <span class="gs-root">sudo dnf install python3-devel</span></code>
<p>Red Hat/CentOS/Fedora 21:</p>
<pre class="gs-console">
<code># <span class="gs-root">sudo yum install python-devel</span></code>
<code># <span class="gs-root">sudo yum install python3-devel</span></code>
<p>Note that many other distros/operating systems (including Arch Linux, *BSD and OS X) do not require such packages, as C headers are included with the base distribution of Python.</p>
@@ -204,7 +204,7 @@ <h2 id="init">Step 2. Initialize a site</h2>
If you do not want to answer and want to go with the defaults instead, simply restart with the `-q` parameter.
--- Questions about the site ---
Site title [My Nikola Site]: <span class="gs-input">My First Nikola Site</span>
...a couple more questions....
...a couple more questions...

That's it, Nikola is now configured. Make sure to edit to your liking.
If you are looking for themes and addons, check out and
@@ -16,7 +16,7 @@
<h1>Nikola — Static Site Generator</h1>
<p>In goes content, out comes a website, ready to deploy.</p>
<p><a class="btn btn-primary btn-lg get-started" href="/getting-started.html" role="button">Get started with Nikola »</a> <a class="btn btn-default btn-lg" href="/features/index.html" role="button">Learn about Nikola features »</a></p>
<p><small>Nikola is written in Python (2.7+/3.3+). Free open-source software under the <a href="/license.html">MIT license</a>.</small></p>
<p><small>Nikola is written in Python (3.3+; 2.7 partially supported). Free open-source software under the <a href="/license.html">MIT license</a>.</small></p>
<div class="container">

0 comments on commit b556039

Please sign in to comment.