6 <meta charset="utf-8" />
7 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8 <meta name="viewport" content="width=device-width, initial-scale=1">
9 <title>Introducing Python 3 support — Searx Documentation (Searx-1.0.0.tex)</title>
10 <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
11 <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
12 <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
13 <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
14 <script src="../_static/jquery.js"></script>
15 <script src="../_static/underscore.js"></script>
16 <script src="../_static/doctools.js"></script>
17 <link rel="index" title="Index" href="../genindex.html" />
18 <link rel="search" title="Search" href="../search.html" />
19 <link rel="prev" title="Searx admin interface" href="admin.html" />
21 <div class="related" role="navigation" aria-label="related navigation">
24 <li class="right" style="margin-right: 10px">
25 <a href="../genindex.html" title="General Index"
26 accesskey="I">index</a></li>
28 <a href="../py-modindex.html" title="Python Module Index"
31 <a href="admin.html" title="Searx admin interface"
32 accesskey="P">previous</a> |</li>
33 <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> »</li>
34 <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> »</li>
35 <li class="nav-item nav-item-this"><a href="">Introducing Python 3 support</a></li>
39 <div class="document">
40 <div class="documentwrapper">
41 <div class="bodywrapper">
42 <div class="body" role="main">
44 <div class="section" id="introducing-python-3-support">
45<h1>Introducing Python 3 support<a class="headerlink" href="#introducing-python-3-support" title="Permalink to this headline">¶</a></h1>
47<p class="sidebar-title">Python 2.7 to 3 upgrade</p>
48<p>This chapter exists of historical reasons. Python 2.7 release schedule ends
49(<a class="reference external" href="https://pythonclock.org/">Python 2.7 clock</a>) after 11 years Python 3 exists</p>
51<p>As most operation systems are coming with Python3 installed by default. So it is
52time for searx to support Python3. But don’t worry support of Python2.7 won’t be
54<a class="reference internal image-reference" href="../_images/searxpy3.png"><img alt="hurray" class="align-center" src="../_images/searxpy3.png" style="width: 510.5px; height: 116.0px;" /></a>
55<div class="section" id="how-to-run-searx-using-python-3">
56<h2>How to run searx using Python 3<a class="headerlink" href="#how-to-run-searx-using-python-3" title="Permalink to this headline">¶</a></h2>
57<p>Please make sure that you run at least Python 3.5.</p>
58<p>To run searx, first a Python3 virtualenv should be created. After entering the
59virtualenv, dependencies must be installed. Then run searx with python3 instead
60of the usual python command.</p>
61<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>virtualenv -p python3 venv3
62<span class="nb">source</span> venv3/bin/activate
63pip3 install -r requirements.txt
64python3 searx/webapp.py
67<p>If you want to run searx using Python2.7, you don’t have to do anything
68differently as before.</p>
70<div class="section" id="fun-facts">
71<h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this headline">¶</a></h2>
73<li><p>115 files were changed when implementing the support for both Python versions.</p></li>
74<li><p>All of the dependencies was compatible except for the robotframework used for
75browser tests. Thus, these tests were migrated to splinter. So from now on
76both versions are being tested on Travis and can be tested locally.</p></li>
79<div class="section" id="if-you-found-bugs">
80<h2>If you found bugs<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline">¶</a></h2>
81<p>Please open an issue on <a class="reference external" href="https://github.com/searx/searx/issues">GitHub</a>. Make sure that you mention your Python
82version in your issue, so we can investigate it properly.</p>
84<div class="section" id="acknowledgment">
85<h2>Acknowledgment<a class="headerlink" href="#acknowledgment" title="Permalink to this headline">¶</a></h2>
86<p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
87<div class="line-block">
88<div class="line">Happy hacking.</div>
89<div class="line">kvch // 2017.05.13 22:57</div>
95 <div class="clearer"></div>
99 <span id="sidebar-top"></span>
100 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
101 <div class="sphinxsidebarwrapper">
104 <p class="logo"><a href="../index.html">
105 <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
109 <h3>Project Links</h3>
111 <li><a href="blog/index.html">Blog</a>
113 <li><a href="https://github.com/searx/searx">Source</a>
115 <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
117 <li><a href="https://searx.space">Public instances</a>
119 <li><a href="https://twitter.com/Searx_engine">Twitter</a>
121 <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
122 </ul><h3>Navigation</h3>
124 <li><a href="../index.html">Overview</a>
126 <li><a href="index.html">Blog</a>
128 <li>Previous: <a href="admin.html" title="previous chapter">Searx admin interface</a>
134<div id="searchbox" style="display: none" role="search">
135 <h3 id="searchlabel">Quick search</h3>
136 <div class="searchformwrapper">
137 <form class="search" action="../search.html" method="get">
138 <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
139 <input type="submit" value="Go" />
143<script>$('#searchbox').show(0);</script>
146 <div class="clearer"></div>
149 <div class="footer" role="contentinfo">
150 © Copyright 2015-2021, Adam Tauber, Noémi Ványi.
151 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
153 <script src="../_static/version_warning_offset.js"></script>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list