python3.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Introducing Python 3 support &#8212; Searx Documentation (Searx-1.1.0.tex)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
  10. <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
  11. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  12. <script src="../_static/jquery.js"></script>
  13. <script src="../_static/underscore.js"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
  15. <script src="../_static/doctools.js"></script>
  16. <script src="../_static/sphinx_highlight.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" />
  20. </head><body>
  21. <div class="related" role="navigation" aria-label="related navigation">
  22. <h3>Navigation</h3>
  23. <ul>
  24. <li class="right" style="margin-right: 10px">
  25. <a href="../genindex.html" title="General Index"
  26. accesskey="I">index</a></li>
  27. <li class="right" >
  28. <a href="../py-modindex.html" title="Python Module Index"
  29. >modules</a> |</li>
  30. <li class="right" >
  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.1.0.tex)</a> &#187;</li>
  34. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
  35. <li class="nav-item nav-item-this"><a href="">Introducing Python 3 support</a></li>
  36. </ul>
  37. </div>
  38. <div class="document">
  39. <div class="documentwrapper">
  40. <div class="bodywrapper">
  41. <div class="body" role="main">
  42. <section id="introducing-python-3-support">
  43. <h1>Introducing Python 3 support<a class="headerlink" href="#introducing-python-3-support" title="Permalink to this heading">¶</a></h1>
  44. <aside class="sidebar">
  45. <p class="sidebar-title">Python 2.7 to 3 upgrade</p>
  46. <p>This chapter exists of historical reasons. Python 2.7 release schedule ends
  47. (<a class="reference external" href="https://pythonclock.org/">Python 2.7 clock</a>) after 11 years Python 3 exists</p>
  48. </aside>
  49. <p>As most operation systems are coming with Python3 installed by default. So it is
  50. time for searx to support Python3. But don’t worry support of Python2.7 won’t be
  51. dropped.</p>
  52. <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>
  53. <section id="how-to-run-searx-using-python-3">
  54. <h2>How to run searx using Python 3<a class="headerlink" href="#how-to-run-searx-using-python-3" title="Permalink to this heading">¶</a></h2>
  55. <p>Please make sure that you run at least Python 3.5.</p>
  56. <p>To run searx, first a Python3 virtualenv should be created. After entering the
  57. virtualenv, dependencies must be installed. Then run searx with python3 instead
  58. of the usual python command.</p>
  59. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>virtualenv -p python3 venv3
  60. <span class="nb">source</span> venv3/bin/activate
  61. pip3 install -r requirements.txt
  62. python3 searx/webapp.py
  63. </pre></div>
  64. </div>
  65. <p>If you want to run searx using Python2.7, you don’t have to do anything
  66. differently as before.</p>
  67. </section>
  68. <section id="fun-facts">
  69. <h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this heading">¶</a></h2>
  70. <ul class="simple">
  71. <li><p>115 files were changed when implementing the support for both Python versions.</p></li>
  72. <li><p>All of the dependencies was compatible except for the robotframework used for
  73. browser tests. Thus, these tests were migrated to splinter. So from now on
  74. both versions are being tested on Travis and can be tested locally.</p></li>
  75. </ul>
  76. </section>
  77. <section id="if-you-found-bugs">
  78. <h2>If you found bugs<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this heading">¶</a></h2>
  79. <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
  80. version in your issue, so we can investigate it properly.</p>
  81. </section>
  82. <section id="acknowledgment">
  83. <h2>Acknowledgment<a class="headerlink" href="#acknowledgment" title="Permalink to this heading">¶</a></h2>
  84. <p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
  85. <div class="line-block">
  86. <div class="line">Happy hacking.</div>
  87. <div class="line">kvch // 2017.05.13 22:57</div>
  88. </div>
  89. </section>
  90. </section>
  91. <div class="clearer"></div>
  92. </div>
  93. </div>
  94. </div>
  95. <span id="sidebar-top"></span>
  96. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  97. <div class="sphinxsidebarwrapper">
  98. <p class="logo"><a href="../index.html">
  99. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  100. </a></p>
  101. <h3>Project Links</h3>
  102. <ul>
  103. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  104. <li><a href="https://github.com/searx/searx">Source</a>
  105. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  106. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  107. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  108. </ul><h3>Navigation</h3>
  109. <ul>
  110. <li><a href="../index.html">Overview</a>
  111. <ul>
  112. <li><a href="index.html">Blog</a>
  113. <ul>
  114. <li>Previous: <a href="admin.html" title="previous chapter">Searx admin interface</a>
  115. </ul>
  116. </li>
  117. </ul>
  118. </li>
  119. </ul>
  120. <div id="searchbox" style="display: none" role="search">
  121. <h3 id="searchlabel">Quick search</h3>
  122. <div class="searchformwrapper">
  123. <form class="search" action="../search.html" method="get">
  124. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  125. <input type="submit" value="Go" />
  126. </form>
  127. </div>
  128. </div>
  129. <script>document.getElementById('searchbox').style.display = "block"</script>
  130. </div>
  131. </div>
  132. <div class="clearer"></div>
  133. </div>
  134. <div class="footer" role="contentinfo">
  135. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  136. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  137. </div>
  138. <script src="../_static/version_warning_offset.js"></script>
  139. </body>
  140. </html>