2017-06-12 12:34:30 +02:00
|
|
|
|
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<!DOCTYPE html>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
|
2020-06-19 11:15:15 +02:00
|
|
|
|
<html>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<head>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<meta charset="utf-8" />
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2020-07-25 18:33:36 +02:00
|
|
|
|
<title>Introducing Python 3 support — Searx Documentation (Searx-0.17.0.tex)</title>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
|
2020-02-15 10:08:58 +01:00
|
|
|
|
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|
|
|
|
<script src="../_static/jquery.js"></script>
|
|
|
|
|
<script src="../_static/underscore.js"></script>
|
|
|
|
|
<script src="../_static/doctools.js"></script>
|
|
|
|
|
<script src="../_static/language_data.js"></script>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
|
|
|
<link rel="search" title="Search" href="../search.html" />
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<link rel="next" title="Searx admin interface" href="admin.html" />
|
2020-06-29 08:26:27 +02:00
|
|
|
|
<link rel="prev" title="Developing in Linux containers [202006]" href="lxcdev-202006.html" />
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
|
2019-12-30 18:31:17 +01:00
|
|
|
|
</head><body>
|
|
|
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
|
|
|
<h3>Navigation</h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="right" style="margin-right: 10px">
|
|
|
|
|
<a href="../genindex.html" title="General Index"
|
|
|
|
|
accesskey="I">index</a></li>
|
2020-11-04 14:12:59 +01:00
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="../py-modindex.html" title="Python Module Index"
|
|
|
|
|
>modules</a> |</li>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="admin.html" title="Searx admin interface"
|
|
|
|
|
accesskey="N">next</a> |</li>
|
|
|
|
|
<li class="right" >
|
2020-06-29 08:26:27 +02:00
|
|
|
|
<a href="lxcdev-202006.html" title="Developing in Linux containers [202006]"
|
2019-12-30 18:31:17 +01:00
|
|
|
|
accesskey="P">previous</a> |</li>
|
2020-07-25 18:33:36 +02:00
|
|
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> »</li>
|
|
|
|
|
<li class="nav-item nav-item-this"><a href="">Introducing Python 3 support</a></li>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
|
|
|
|
|
<div class="document">
|
|
|
|
|
<div class="documentwrapper">
|
|
|
|
|
<div class="bodywrapper">
|
|
|
|
|
<div class="body" role="main">
|
|
|
|
|
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<div class="section" id="introducing-python-3-support">
|
|
|
|
|
<h1>Introducing Python 3 support<a class="headerlink" href="#introducing-python-3-support" title="Permalink to this headline">¶</a></h1>
|
|
|
|
|
<div class="sidebar">
|
|
|
|
|
<p class="sidebar-title">Python 2.7 to 3 upgrade</p>
|
|
|
|
|
<p>This chapter exists of historical reasons. Python 2.7 release schedule ends
|
|
|
|
|
(<a class="reference external" href="https://pythonclock.org/">Python 2.7 clock</a>) after 11 years Python 3 exists</p>
|
|
|
|
|
</div>
|
|
|
|
|
<p>As most operation systems are coming with Python3 installed by default. So it is
|
|
|
|
|
time for searx to support Python3. But don’t worry support of Python2.7 won’t be
|
|
|
|
|
dropped.</p>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<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>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<div class="section" id="how-to-run-searx-using-python-3">
|
|
|
|
|
<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>
|
|
|
|
|
<p>Please make sure that you run at least Python 3.5.</p>
|
|
|
|
|
<p>To run searx, first a Python3 virtualenv should be created. After entering the
|
|
|
|
|
virtualenv, dependencies must be installed. Then run searx with python3 instead
|
|
|
|
|
of the usual python command.</p>
|
|
|
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>virtualenv -p python3 venv3
|
|
|
|
|
<span class="nb">source</span> venv3/bin/activate
|
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
|
python3 searx/webapp.py
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</pre></div>
|
|
|
|
|
</div>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<p>If you want to run searx using Python2.7, you don’t have to do anything
|
|
|
|
|
differently as before.</p>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="fun-facts">
|
|
|
|
|
<h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this headline">¶</a></h2>
|
|
|
|
|
<ul class="simple">
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<li><p>115 files were changed when implementing the support for both Python versions.</p></li>
|
|
|
|
|
<li><p>All of the dependencies was compatible except for the robotframework used for
|
|
|
|
|
browser tests. Thus, these tests were migrated to splinter. So from now on
|
|
|
|
|
both versions are being tested on Travis and can be tested locally.</p></li>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="if-you-found-bugs">
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<h2>If you found bugs<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline">¶</a></h2>
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<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
|
2019-12-30 18:31:17 +01:00
|
|
|
|
version in your issue, so we can investigate it properly.</p>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<div class="section" id="acknowledgment">
|
|
|
|
|
<h2>Acknowledgment<a class="headerlink" href="#acknowledgment" title="Permalink to this headline">¶</a></h2>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
|
|
|
|
|
<div class="line-block">
|
|
|
|
|
<div class="line">Happy hacking.</div>
|
|
|
|
|
<div class="line">kvch // 2017.05.13 22:57</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<div class="clearer"></div>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<span id="sidebar-top"></span>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<div class="sphinxsidebarwrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="logo"><a href="../index.html">
|
|
|
|
|
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
|
|
|
|
|
</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Project Links</h3>
|
|
|
|
|
<ul>
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<li><a href="https://github.com/searx/searx">Source</a>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
|
2020-09-30 10:35:05 +02:00
|
|
|
|
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
|
2020-02-15 10:08:58 +01:00
|
|
|
|
<li><a href="https://searx.space/">Public instances</a>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
|
|
|
|
|
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
|
|
|
|
</ul><h3>Navigation</h3>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
<ul>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<li><a href="../index.html">Overview</a>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><a href="index.html">Blog</a>
|
|
|
|
|
<ul>
|
2020-06-29 08:26:27 +02:00
|
|
|
|
<li>Previous: <a href="lxcdev-202006.html" title="previous chapter">Developing in Linux containers [202006]</a>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<li>Next: <a href="admin.html" title="next chapter">Searx admin interface</a></ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</ul>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
<div id="searchbox" style="display: none" role="search">
|
|
|
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
|
|
|
<div class="searchformwrapper">
|
|
|
|
|
<form class="search" action="../search.html" method="get">
|
|
|
|
|
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
|
|
|
<input type="submit" value="Go" />
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
2020-02-15 10:08:58 +01:00
|
|
|
|
<script>$('#searchbox').show(0);</script>
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearer"></div>
|
|
|
|
|
</div>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
|
|
|
|
|
<div class="footer" role="contentinfo">
|
2020-02-20 19:32:55 +01:00
|
|
|
|
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
2020-09-30 10:35:05 +02:00
|
|
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</div>
|
2020-02-15 10:08:58 +01:00
|
|
|
|
<script src="../_static/version_warning_offset.js"></script>
|
2019-12-30 18:31:17 +01:00
|
|
|
|
|
2017-05-12 22:51:48 +02:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|