python3.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ============================
  2. Introducing Python 3 support
  3. ============================
  4. .. _Python 2.7 clock: https://pythonclock.org/
  5. .. sidebar:: Python 2.7 to 3 upgrade
  6. This chapter exists of historical reasons. Python 2.7 release schedule ends
  7. (`Python 2.7 clock`_) after 11 years Python 3 exists
  8. As most operation systems are coming with Python3 installed by default. So it is
  9. time for searx to support Python3. But don't worry support of Python2.7 won't be
  10. dropped.
  11. .. image:: searxpy3.png
  12. :scale: 50 %
  13. :alt: hurray
  14. :align: center
  15. How to run searx using Python 3
  16. ===============================
  17. Please make sure that you run at least Python 3.5.
  18. To run searx, first a Python3 virtualenv should be created. After entering the
  19. virtualenv, dependencies and searx must be installed. Then run searx from the
  20. command line.
  21. .. code:: sh
  22. python3 -m venv venv3
  23. source venv3/bin/activate
  24. pip install -U pip setuptools wheel pyyaml
  25. pip install -e .
  26. searx-run
  27. Fun facts
  28. =========
  29. - 115 files were changed when implementing the support for both Python versions.
  30. - All of the dependencies was compatible except for the robotframework used for
  31. browser tests. Thus, these tests were migrated to splinter. So from now on
  32. both versions are being tested on Travis and can be tested locally.
  33. If you found bugs
  34. =================
  35. Please open an issue on `GitHub`_. Make sure that you mention your Python
  36. version in your issue, so we can investigate it properly.
  37. .. _GitHub: https://github.com/searxng/searxng/issues
  38. Acknowledgment
  39. ==============
  40. This development was sponsored by `NLnet Foundation`_.
  41. .. _NLnet Foundation: https://nlnet.nl/
  42. | Happy hacking.
  43. | kvch // 2017.05.13 22:57