123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>Introducing Python3 support &#8212; searx 0.12.0 documentation</title>
  8. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  10. <script type="text/javascript" src="../_static/documentation_options.js"></script>
  11. <script type="text/javascript" src="../_static/jquery.js"></script>
  12. <script type="text/javascript" src="../_static/underscore.js"></script>
  13. <script type="text/javascript" src="../_static/doctools.js"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  17. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  18. </head><body>
  19. <div class="document">
  20. <div class="documentwrapper">
  21. <div class="bodywrapper">
  22. <div class="body" role="main">
  23. <div class="section" id="introducing-python3-support">
  24. <h1>Introducing Python3 support<a class="headerlink" href="#introducing-python3-support" title="Permalink to this headline">¶</a></h1>
  25. <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>
  26. <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>
  27. <div class="section" id="how-to-run-searx-using-python3">
  28. <h2>How to run searx using Python3<a class="headerlink" href="#how-to-run-searx-using-python3" title="Permalink to this headline">¶</a></h2>
  29. <p>Please make sure that you run at least Python3.5.</p>
  30. <p>To run searx, first a Python3 virtualenv should be created. After entering the virtualenv,
  31. dependencies must be installed. Then run searx with python3 instead of the usual python command.</p>
  32. <div class="code sh highlight-default notranslate"><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>
  33. <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>
  34. <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>
  35. <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>
  36. </pre></div>
  37. </div>
  38. <p>If you want to run searx using Python2.7, you don’t have to do anything differently as before.</p>
  39. </div>
  40. <div class="section" id="fun-facts">
  41. <h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this headline">¶</a></h2>
  42. <ul class="simple">
  43. <li>115 files were changed when implementing the support for both Python versions.</li>
  44. <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>
  45. </ul>
  46. </div>
  47. <div class="section" id="if-you-found-bugs">
  48. <h2>If you found bugs…<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline">¶</a></h2>
  49. <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,
  50. so we can investigate it properly.</p>
  51. </div>
  52. <div class="section" id="acknowledgement">
  53. <h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this headline">¶</a></h2>
  54. <p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
  55. <div class="line-block">
  56. <div class="line">Happy hacking.</div>
  57. <div class="line">kvch // 2017.05.13 22:57</div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  65. <div class="sphinxsidebarwrapper">
  66. <h3><a href="../index.html">Table Of Contents</a></h3>
  67. <ul>
  68. <li><a class="reference internal" href="#">Introducing Python3 support</a><ul>
  69. <li><a class="reference internal" href="#how-to-run-searx-using-python3">How to run searx using Python3</a></li>
  70. <li><a class="reference internal" href="#fun-facts">Fun facts</a></li>
  71. <li><a class="reference internal" href="#if-you-found-bugs">If you found bugs…</a></li>
  72. <li><a class="reference internal" href="#acknowledgement">Acknowledgement</a></li>
  73. </ul>
  74. </li>
  75. </ul>
  76. <div class="sidebar_container body">
  77. <h1>Searx</h1>
  78. <ul>
  79. <li><a href="../index.html">Home</a></li>
  80. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  81. <li><a href="blog.html">Blog</a></li>
  82. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  83. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  84. </ul>
  85. <hr />
  86. <ul>
  87. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  88. </ul>
  89. </div>
  90. <div role="note" aria-label="source link">
  91. <h3>This Page</h3>
  92. <ul class="this-page-menu">
  93. <li><a href="../_sources/blog/python3.rst.txt"
  94. rel="nofollow">Show Source</a></li>
  95. </ul>
  96. </div>
  97. <div id="searchbox" style="display: none" role="search">
  98. <h3>Quick search</h3>
  99. <div class="searchformwrapper">
  100. <form class="search" action="../search.html" method="get">
  101. <input type="text" name="q" />
  102. <input type="submit" value="Go" />
  103. <input type="hidden" name="check_keywords" value="yes" />
  104. <input type="hidden" name="area" value="default" />
  105. </form>
  106. </div>
  107. </div>
  108. <script type="text/javascript">$('#searchbox').show(0);</script>
  109. </div>
  110. </div>
  111. <div class="clearer"></div>
  112. </div>
  113. <div class="footer">
  114. &copy; Copyright 2015-2017, Adam Tauber.
  115. </div>
  116. </body>
  117. </html>