on master help sign in
searx/docs/blog/python3.rst
68 lines 1.8 kB history raw
1============================
2Introducing Python 3 support
3============================
5.. _Python 2.7 clock: https://pythonclock.org/
7.. sidebar:: Python 2.7 to 3 upgrade
9 This chapter exists of historical reasons. Python 2.7 release schedule ends
10 (`Python 2.7 clock`_) after 11 years Python 3 exists
12As most operation systems are coming with Python3 installed by default. So it is
13time for searx to support Python3. But don't worry support of Python2.7 won't be
14dropped.
16.. image:: searxpy3.png
17 :scale: 50 %
18 :alt: hurray
19 :align: center
22How to run searx using Python 3
23===============================
25Please make sure that you run at least Python 3.5.
27To run searx, first a Python3 virtualenv should be created. After entering the
28virtualenv, dependencies must be installed. Then run searx with python3 instead
29of the usual python command.
31.. code:: sh
33 virtualenv -p python3 venv3
34 source venv3/bin/activate
35 pip3 install -r requirements.txt
36 python3 searx/webapp.py
39If you want to run searx using Python2.7, you don't have to do anything
40differently as before.
42Fun facts
43=========
45- 115 files were changed when implementing the support for both Python versions.
47- All of the dependencies was compatible except for the robotframework used for
48 browser tests. Thus, these tests were migrated to splinter. So from now on
49 both versions are being tested on Travis and can be tested locally.
51If you found bugs
52=================
54Please open an issue on `GitHub`_. Make sure that you mention your Python
55version in your issue, so we can investigate it properly.
57.. _GitHub: https://github.com/searx/searx/issues
59Acknowledgment
60==============
62This development was sponsored by `NLnet Foundation`_.
64.. _NLnet Foundation: https://nlnet.nl/
67| Happy hacking.
68| kvch // 2017.05.13 22:57