mirror of https://github.com/searxng/searxng.git
[fix] webapp.py - running without installation is not supported
Remove extension of the sys.path (aka PYTHONPATH). Running instance directly from repository's folder is a relict from the early beginning in 2014 (fd651083f
) and is no longer supported. Since commitdd46629
was merged the command line 'searx-run' exists and should be used. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
7c76cef746
commit
85364edaf0
|
@ -25,19 +25,16 @@ How to run searx using Python 3
|
||||||
Please make sure that you run at least Python 3.5.
|
Please make sure that you run at least Python 3.5.
|
||||||
|
|
||||||
To run searx, first a Python3 virtualenv should be created. After entering the
|
To run searx, first a Python3 virtualenv should be created. After entering the
|
||||||
virtualenv, dependencies must be installed. Then run searx with python3 instead
|
virtualenv, dependencies and searx must be installed. Then run searx from the
|
||||||
of the usual python command.
|
command line.
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
virtualenv -p python3 venv3
|
python3 -m venv venv3
|
||||||
source venv3/bin/activate
|
source venv3/bin/activate
|
||||||
pip3 install -r requirements.txt
|
pip install -U pip setuptools wheel pyyaml
|
||||||
python3 searx/webapp.py
|
pip install -e .
|
||||||
|
searx-run
|
||||||
|
|
||||||
If you want to run searx using Python2.7, you don't have to do anything
|
|
||||||
differently as before.
|
|
||||||
|
|
||||||
Fun facts
|
Fun facts
|
||||||
=========
|
=========
|
||||||
|
|
|
@ -22,10 +22,6 @@ if sys.version_info[0] < 3:
|
||||||
print('\033[1;31m Python2 is no longer supported\033[0m')
|
print('\033[1;31m Python2 is no longer supported\033[0m')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
from os.path import realpath, dirname
|
|
||||||
sys.path.append(realpath(dirname(realpath(__file__)) + '/../'))
|
|
||||||
|
|
||||||
# set Unix thread name
|
# set Unix thread name
|
||||||
try:
|
try:
|
||||||
import setproctitle
|
import setproctitle
|
||||||
|
|
Loading…
Reference in New Issue