Skip to content

Commit b556039

Browse files
committedSep 26, 2015
Survey results
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 31bc4a5 commit b556039

File tree

3 files changed

+138
-8
lines changed

3 files changed

+138
-8
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.. title: Environment Survey Results and the Future of Python 2.7 in Nikola
2+
.. slug: env-survey-results-and-the-future-of-python-27
3+
.. date: 2015-09-26 10:00:00 UTC
4+
.. tags: python, survey, planet
5+
.. category:
6+
.. link:
7+
.. description:
8+
.. type: text
9+
.. author: Chris Warrick
10+
11+
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:
12+
13+
Most users already are on Python 3
14+
==================================
15+
16+
Two thirds (66%) of Nikola users are already on Python 3. Some users run both versions concurrently (for example, on different operating systems)
17+
18+
.. chart:: Pie
19+
:title: 'Python 2 and 3 users'
20+
21+
'Python 2 only', 46
22+
'Python 3 only', 73
23+
'Python 2 and 3', 19
24+
25+
A diverse selection of operating systems
26+
========================================
27+
28+
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)
29+
30+
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
31+
32+
.. chart:: Bar
33+
:title: 'Operating systems used by survey participants'
34+
35+
'Ubuntu', 54
36+
'Debian', 37
37+
'Mac OS X', 37
38+
'Windows', 27
39+
'Arch Linux', 20
40+
'BSD', 9
41+
'Linux Mint', 8
42+
'Fedora', 7
43+
'RedHat/CentOS', 3
44+
'openSUSE', 3
45+
'Gentoo', 2
46+
'Other', 4
47+
48+
Switching is not a problem for the community
49+
============================================
50+
51+
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.
52+
53+
.. chart:: Pie
54+
:title: 'Python 3 interpreter usage'
55+
56+
'Have a Python 3 interpreter', 106
57+
'Can install Python 3 if required', 22
58+
'Refuse to install Python 3', 10
59+
60+
Comments, concerns and suggestions
61+
==================================
62+
63+
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.
64+
65+
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.
66+
67+
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).
68+
69+
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.
70+
71+
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).
72+
73+
The future of Python 2.7 in Nikola
74+
==================================
75+
76+
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.
77+
78+
Switching to Python 3.x
79+
=======================
80+
81+
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:
82+
83+
Windows
84+
-------
85+
86+
1. Install Python 3.5 from the official website (`python.org`__)
87+
2. Install virtualenv using ``py -m pip install virtualenv``
88+
3. Create a virtualenv and activate it (for more information, read `virtualenv documentation`__)
89+
4. Install lxml and Pillow wheels from `Christoph Gohlke’s website`__ (using ``pip install c:\paths\to\the\two\files.whl``)
90+
5. Install Nikola using ``pip install "Nikola[extras]"``
91+
92+
Mac OS X
93+
--------
94+
95+
Follow the “Installing on OS X” section of the `Getting Started Guide`__ to install Nikola and Python from Homebrew, MacPorts or Fink.
96+
97+
Linux
98+
-----
99+
100+
To install Nikola using Python 3.x on Linux, you should first identify your installation method.
101+
102+
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.
103+
104+
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)
105+
106+
(Note that Nikola requires Python 3.3 or newer; if you are running a *really* old distribution, it might not be available.)
107+
108+
Migrating a site
109+
----------------
110+
111+
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::
112+
113+
doit.dependency.DatabaseException: Dependencies file in '.doit.db' seems to use an old format or is corrupted.
114+
To fix the issue you can just remove the database file(s) and a new one will be generated.
115+
116+
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.
117+
118+
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.
119+
120+
__ https://getnikola.com/blog/nikola-environment-survey-python-273x-usage.html
121+
__ https://github.com/rbrewer123/docker_nikola
122+
__ https://getnikola.com/getting-started.html
123+
__ https://getnikola.com/getting-started.html
124+
__ https://www.python.org/
125+
__ https://virtualenv.pypa.io/en/latest/
126+
__ http://www.lfd.uci.edu/~gohlke/pythonlibs/
127+
__ https://getnikola.com/getting-started.html
128+
__ https://getnikola.com/getting-started.html
129+
__ https://docs.google.com/forms/d/15dnvSCO0JP9IX9MvjRI3aofCQaDFcl2S0aTsApkCAbY/viewanalytics
130+
__ http://www.pygal.org/

Diff for: ‎stories/getting-started.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.. author: The Nikola Team
1111
-->
1212

13-
<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>
13+
<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>
1414
<div class="row">
1515
<h2 id="install">Step 1. Install Nikola</h2>
1616
<div class="col-md-7">
@@ -31,7 +31,7 @@ <h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#ac
3131
<div class="panel-body">
3232
<p>Nikola supports Windows! Keep in mind, though, that there are some caveats:</p>
3333
<ol class="arabic simple">
34-
<li>You need to install <a href="https://www.python.org/downloads/">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>
34+
<li>You need to install <a href="https://www.python.org/downloads/">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>
3535
<li>
3636
<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="https://pypi.python.org/">PyPI</a> pages to find official packages, use <a class="reference external" href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">the unofficial wheels by Christoph Gohlke</a>, or get them somewhere else.
3737
</li>
@@ -86,7 +86,7 @@ <h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse
8686
<div class="panel-body">
8787
<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>
8888
<ul class="simple">
89-
<li>Arch Linux (AUR): <a class="reference external" href="https://aur.archlinux.org/packages/python-nikola/">python-nikola</a> / <a class="reference external" href="https://aur.archlinux.org/packages/python2-nikola/">python2-nikola</a> for the latest stable release or <a class="reference external" href="https://aur.archlinux.org/packages/python-nikola-git/">python-nikola-git</a> / <a class="reference external" href="https://aur.archlinux.org/packages/python2-nikola-git/">python2-nikola-git</a> for the GitHub master. (official Nikola-supported packages)
89+
<li>Arch Linux (AUR): <a class="reference external" href="https://aur.archlinux.org/packages/python-nikola/">python-nikola</a> for the latest stable release or <a class="reference external" href="https://aur.archlinux.org/packages/python-nikola-git/">python-nikola-git</a> for the GitHub master. (official Nikola-supported packages)
9090
</li>
9191
<li>Fedora: <a class="reference external" href="https://admin.fedoraproject.org/pkgdb/package/python-nikola/">python-nikola</a> (incl. python3-nikola)
9292
</li>
@@ -107,15 +107,15 @@ <h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse
107107
<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>
108108
<p>Debian systems:</p>
109109
<pre class="gs-console">
110-
<code># <span class="gs-root">sudo apt-get install python-dev</span></code>
110+
<code># <span class="gs-root">sudo apt-get install python3-dev</span></code>
111111
</pre>
112112
<p>Fedora 22+:</p>
113113
<pre class="gs-console">
114-
<code># <span class="gs-root">sudo dnf install python-devel</span></code>
114+
<code># <span class="gs-root">sudo dnf install python3-devel</span></code>
115115
</pre>
116116
<p>Red Hat/CentOS/Fedora 21:</p>
117117
<pre class="gs-console">
118-
<code># <span class="gs-root">sudo yum install python-devel</span></code>
118+
<code># <span class="gs-root">sudo yum install python3-devel</span></code>
119119
</pre>
120120
<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>
121121
</div>
@@ -204,7 +204,7 @@ <h2 id="init">Step 2. Initialize a site</h2>
204204
If you do not want to answer and want to go with the defaults instead, simply restart with the `-q` parameter.
205205
--- Questions about the site ---
206206
Site title [My Nikola Site]: <span class="gs-input">My First Nikola Site</span>
207-
...a couple more questions....
207+
...a couple more questions...
208208

209209
That's it, Nikola is now configured. Make sure to edit conf.py to your liking.
210210
If you are looking for themes and addons, check out https://themes.getnikola.com/ and https://plugins.getnikola.com/.

Diff for: ‎stories/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<h1>Nikola — Static Site Generator</h1>
1717
<p>In goes content, out comes a website, ready to deploy.</p>
1818
<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>
19-
<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>
19+
<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>
2020
</div>
2121
</div>
2222
<div class="container">

0 commit comments

Comments
 (0)
Please sign in to comment.