123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Introducing Python3 support &#8212; searx 0.12.0 documentation</title>
  7. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.12.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true,
  16. SOURCELINK_SUFFIX: '.txt'
  17. };
  18. </script>
  19. <script type="text/javascript" src="../_static/jquery.js"></script>
  20. <script type="text/javascript" src="../_static/underscore.js"></script>
  21. <script type="text/javascript" src="../_static/doctools.js"></script>
  22. <link rel="index" title="Index" href="../genindex.html" />
  23. <link rel="search" title="Search" href="../search.html" />
  24. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  25. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  26. </head>
  27. <body>
  28. <div class="document">
  29. <div class="documentwrapper">
  30. <div class="bodywrapper">
  31. <div class="body" role="main">
  32. <div class="section" id="introducing-python3-support">
  33. <h1>Introducing Python3 support<a class="headerlink" href="#introducing-python3-support" title="Permalink to this headline">¶</a></h1>
  34. <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>
  35. <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>
  36. <div class="section" id="how-to-run-searx-using-python3">
  37. <h2>How to run searx using Python3<a class="headerlink" href="#how-to-run-searx-using-python3" title="Permalink to this headline">¶</a></h2>
  38. <p>Please make sure that you run at least Python3.5.</p>
  39. <p>To run searx, first a Python3 virtualenv should be created. After entering the virtualenv,
  40. dependencies must be installed. Then run searx with python3 instead of the usual python command.</p>
  41. <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>
  42. <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>
  43. <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>
  44. <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>
  45. </pre></div>
  46. </div>
  47. <p>If you want to run searx using Python2.7, you don’t have to do anything differently as before.</p>
  48. </div>
  49. <div class="section" id="fun-facts">
  50. <h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this headline">¶</a></h2>
  51. <ul class="simple">
  52. <li>115 files were changed when implementing the support for both Python versions.</li>
  53. <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>
  54. </ul>
  55. </div>
  56. <div class="section" id="if-you-found-bugs">
  57. <h2>If you found bugs…<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline">¶</a></h2>
  58. <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,
  59. so we can investigate it properly.</p>
  60. </div>
  61. <div class="section" id="acknowledgement">
  62. <h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this headline">¶</a></h2>
  63. <p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
  64. <div class="line-block">
  65. <div class="line">Happy hacking.</div>
  66. <div class="line">kvch // 2017.05.13 22:57</div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  74. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  75. <h1>Searx</h1>
  76. <ul>
  77. <li><a href="../index.html">Home</a></li>
  78. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  79. <li><a href="blog.html">Blog</a></li>
  80. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  81. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  82. </ul>
  83. <hr />
  84. <ul>
  85. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  86. </ul>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="clearer"></div>
  91. </div>
  92. <div class="footer">
  93. &copy; Copyright 2015-2017, Adam Tauber.
  94. </div>
  95. </body>
  96. </html>