searx/blog/python3.html

105 lines
5.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Introducing Python3 support &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="introducing-python3-support">
<h1>Introducing Python3 support<a class="headerlink" href="#introducing-python3-support" title="Permalink to this headline"></a></h1>
<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-python3">
<h2>How to run searx using Python3<a class="headerlink" href="#how-to-run-searx-using-python3" title="Permalink to this headline"></a></h2>
<p>Please make sure that you run at least Python3.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="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">virtualenv</span> <span class="o">-</span><span class="n">p</span> <span class="n">python3</span> <span class="n">venv3</span>
<span class="n">source</span> <span class="n">venv3</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
<span class="n">pip3</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">.</span><span class="n">txt</span>
<span class="n">python3</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<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">
<li>115 files were changed when implementing the support for both Python versions.</li>
<li>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.</li>
</ul>
</div>
<div class="section" id="if-you-found-bugs">
<h2>If you found bugs…<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline"></a></h2>
<p>…please open an issue on <a class="reference external" href="https://github.com/asciimoo/searx/issues">GitHub</a>. Make sure that you mention your Python version in your issue,
so we can investigate it properly.</p>
</div>
<div class="section" id="acknowledgement">
<h2>Acknowledgement<a class="headerlink" href="#acknowledgement" 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>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2017, Adam Tauber.
</div>
</body>
</html>