searx/blog/python3.html

156 lines
6.7 KiB
HTML
Raw Normal View History

2019-12-30 18:31:17 +01:00
<!DOCTYPE html>
2020-06-19 11:15:15 +02:00
<html>
<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">
<title>Introducing Python 3 support &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/searx.css" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
2020-02-15 10:08:58 +01:00
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="Searx admin interface" href="admin.html" />
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>
<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="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
2020-09-30 10:35:05 +02:00
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</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>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="introducing-python-3-support">
2019-12-30 18:31:17 +01:00
<h1>Introducing Python 3 support<a class="headerlink" href="#introducing-python-3-support" title="Permalink to this headline"></a></h1>
<div class="sidebar">
2019-12-30 18:31:17 +01:00
<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>
2019-12-30 18:31:17 +01:00
<p>As most operation systems are coming with Python3 installed by default. So it is
time for searx to support Python3. But dont worry support of Python2.7 wont be
dropped.</p>
<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>
<div class="section" id="how-to-run-searx-using-python-3">
2019-12-30 18:31:17 +01:00
<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
</pre></div>
</div>
2019-12-30 18:31:17 +01:00
<p>If you want to run searx using Python2.7, you dont have to do anything
differently as before.</p>
</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>
</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>
</div>
<div class="section" id="acknowledgment">
2019-12-30 18:31:17 +01:00
<h2>Acknowledgment<a class="headerlink" href="#acknowledgment" title="Permalink to this headline"></a></h2>
<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>
</div>
</div>
</div>
2019-12-30 18:31:17 +01:00
<span id="sidebar-top"></span>
<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>
<li><a href="blog/index.html">Blog</a>
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
<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>
<li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
2019-12-30 18:31:17 +01:00
</ul><h3>Navigation</h3>
<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>
<li>Previous: <a href="admin.html" title="previous chapter">Searx admin interface</a>
</ul>
2019-12-30 18:31:17 +01:00
</li>
</ul>
</li>
</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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
2019-12-30 18:31:17 +01:00
<input type="submit" value="Go" />
</form>
</div>
</div>
2020-02-15 10:08:58 +01:00
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
2019-12-30 18:31:17 +01:00
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2021, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
</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
</body>
</html>