redislabs-training / redis-sitesearch

Real-time search and indexing for any website
MIT License
33 stars 10 forks source link

python3 setup.py install error #10

Open DineshGuptaa opened 2 years ago

DineshGuptaa commented 2 years ago

Hi, I am on Oracle Linux 8.4. I git git clone your repo and run the setup.py as python3 setup.py install and getting below issue:

[dinesh@localhost redis-sitesearch]$ python3 setup.py install
running install
running bdist_egg
running egg_info
writing redis_sitesearch.egg-info/PKG-INFO
writing dependency_links to redis_sitesearch.egg-info/dependency_links.txt
writing entry points to redis_sitesearch.egg-info/entry_points.txt
writing requirements to redis_sitesearch.egg-info/requires.txt
writing top-level names to redis_sitesearch.egg-info/top_level.txt
reading manifest file 'redis_sitesearch.egg-info/SOURCES.txt'
writing manifest file 'redis_sitesearch.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/__init__.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/cluster_aware_rq.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/config.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/connections.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/errors.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/indexer.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/keys.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/models.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/query_parser.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/scorers.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/tasks.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/transformer.py -> build/bdist.linux-x86_64/egg/sitesearch
copying build/lib/sitesearch/validators.py -> build/bdist.linux-x86_64/egg/sitesearch
creating build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/__init__.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/app.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/authentication.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/health.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/indexer.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/job.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/search.py -> build/bdist.linux-x86_64/egg/sitesearch/api
copying build/lib/sitesearch/api/wsgi.py -> build/bdist.linux-x86_64/egg/sitesearch/api
creating build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/__init__.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/clear_indexes.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/deploy.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/drop_index.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/index.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
copying build/lib/sitesearch/commands/search.py -> build/bdist.linux-x86_64/egg/sitesearch/commands
creating build/bdist.linux-x86_64/egg/sitesearch/sites
copying build/lib/sitesearch/sites/__init__.py -> build/bdist.linux-x86_64/egg/sitesearch/sites
copying build/lib/sitesearch/sites/andrewbrookins.py -> build/bdist.linux-x86_64/egg/sitesearch/sites
copying build/lib/sitesearch/sites/redis_labs.py -> build/bdist.linux-x86_64/egg/sitesearch/sites
copying build/lib/sitesearch/sites/redis_labs_landing_pages.py -> build/bdist.linux-x86_64/egg/sitesearch/sites
creating build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/__init__.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/conftest.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_document_transformer.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_health_api.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_indexer.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_query_parser.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_search_api.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_validators.py -> build/bdist.linux-x86_64/egg/tests
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/cluster_aware_rq.py to cluster_aware_rq.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/config.py to config.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/connections.py to connections.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/errors.py to errors.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/indexer.py to indexer.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/keys.py to keys.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/models.py to models.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/query_parser.py to query_parser.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/scorers.py to scorers.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/tasks.py to tasks.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/transformer.py to transformer.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/validators.py to validators.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/app.py to app.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/authentication.py to authentication.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/health.py to health.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/indexer.py to indexer.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/job.py to job.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/search.py to search.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/api/wsgi.py to wsgi.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/clear_indexes.py to clear_indexes.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/deploy.py to deploy.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/drop_index.py to drop_index.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/index.py to index.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/commands/search.py to search.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/sites/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/sites/andrewbrookins.py to andrewbrookins.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/sites/redis_labs.py to redis_labs.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/sitesearch/sites/redis_labs_landing_pages.py to redis_labs_landing_pages.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/conftest.py to conftest.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_document_transformer.py to test_document_transformer.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_health_api.py to test_health_api.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_indexer.py to test_indexer.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_query_parser.py to test_query_parser.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_search_api.py to test_search_api.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_validators.py to test_validators.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying redis_sitesearch.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
tests.__pycache__.conftest.cpython-38: module references __file__
tests.__pycache__.test_indexer.cpython-38: module references __file__
creating 'dist/redis_sitesearch-1.0-py3.8.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing redis_sitesearch-1.0-py3.8.egg
removing '/home/dinesh/.ENV/lib/python3.8/site-packages/redis_sitesearch-1.0-py3.8.egg' (and everything under it)
creating /home/dinesh/.ENV/lib/python3.8/site-packages/redis_sitesearch-1.0-py3.8.egg
Extracting redis_sitesearch-1.0-py3.8.egg to /home/dinesh/.ENV/lib/python3.8/site-packages
redis-sitesearch 1.0 is already the active version in easy-install.pth
Installing build_images script to /home/dinesh/.ENV/bin
Installing clear_old_indexes script to /home/dinesh/.ENV/bin
Installing deploy_app script to /home/dinesh/.ENV/bin
Installing deploy_worker script to /home/dinesh/.ENV/bin
Installing drop_index script to /home/dinesh/.ENV/bin
Installing index script to /home/dinesh/.ENV/bin
Installing search script to /home/dinesh/.ENV/bin

Installed /home/dinesh/.ENV/lib/python3.8/site-packages/redis_sitesearch-1.0-py3.8.egg
Processing dependencies for redis-sitesearch==1.0
Searching for uvloop==0.15.2
Reading https://pypi.org/simple/uvloop/
Downloading https://files.pythonhosted.org/packages/44/6e/0cb292e4e6ee1382e2ede458f90c94b4f990b261f738403ac45cb8183bc2/uvloop-0.15.2.tar.gz#sha256=2bb0624a8a70834e54dde8feed62ed63b50bad7a1265c40d6403a2ac447bce01
Best match: uvloop 0.15.2
Processing uvloop-0.15.2.tar.gz
Writing /tmp/easy_install-dbr5lqpi/uvloop-0.15.2/setup.cfg
Running uvloop-0.15.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dbr5lqpi/uvloop-0.15.2/egg-dist-tmp-s2_kk5oz
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gcc way to treat warnings as errors... -Werror
checking if gcc supports -fvisibility=hidden... yes
checking if gcc supports -g flag... yes
checking if gcc supports -std=gnu89 flag... yes
checking if gcc supports -Wall flag... yes
checking if gcc supports -Wextra flag... yes
checking if gcc supports -Wno-long-long flag... yes
checking if gcc supports -Wno-unused-parameter flag... yes
checking if gcc supports -Wstrict-prototypes flag... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for dlopen in -ldl... yes
checking for library containing kstat_lookup... no
checking for library containing gethostbyname... none required
checking for library containing perfstat_cpu... no
checking for library containing clock_gettime... none required
checking for library containing sendfile... none required
checking for library containing socket... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking sys/ahafs_evProds.h usability... no
checking sys/ahafs_evProds.h presence... no
checking for sys/ahafs_evProds.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libuv.pc
config.status: executing depfiles commands
config.status: executing libtool commands
  CC       src/libuv_la-fs-poll.lo
  CC       src/libuv_la-idna.lo
  CC       src/libuv_la-inet.lo
  CC       src/libuv_la-random.lo
  CC       src/libuv_la-strscpy.lo
  CC       src/libuv_la-threadpool.lo
  CC       src/libuv_la-timer.lo
  CC       src/libuv_la-uv-data-getter-setters.lo
  CC       src/libuv_la-uv-common.lo
  CC       src/libuv_la-version.lo
  CC       src/unix/libuv_la-async.lo
  CC       src/unix/libuv_la-core.lo
  CC       src/unix/libuv_la-dl.lo
  CC       src/unix/libuv_la-fs.lo
  CC       src/unix/libuv_la-getaddrinfo.lo
  CC       src/unix/libuv_la-getnameinfo.lo
  CC       src/unix/libuv_la-loop-watcher.lo
  CC       src/unix/libuv_la-loop.lo
  CC       src/unix/libuv_la-pipe.lo
  CC       src/unix/libuv_la-poll.lo
  CC       src/unix/libuv_la-process.lo
  CC       src/unix/libuv_la-random-devurandom.lo
  CC       src/unix/libuv_la-signal.lo
  CC       src/unix/libuv_la-stream.lo
  CC       src/unix/libuv_la-tcp.lo
  CC       src/unix/libuv_la-thread.lo
  CC       src/unix/libuv_la-tty.lo
  CC       src/unix/libuv_la-udp.lo
  CC       src/unix/libuv_la-linux-core.lo
  CC       src/unix/libuv_la-linux-inotify.lo
  CC       src/unix/libuv_la-linux-syscalls.lo
  CC       src/unix/libuv_la-procfs-exepath.lo
  CC       src/unix/libuv_la-proctitle.lo
  CC       src/unix/libuv_la-random-getrandom.lo
  CC       src/unix/libuv_la-random-sysctl-linux.lo
  CCLD     libuv.la
uvloop/loop.c:20:10: fatal error: Python.h: No such file or directory
 #include "Python.h"
          ^~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

Please help me what need to do.

abrookins commented 2 years ago

Hi Dinesh! Thanks for your report. The supported installation of this application is via Docker. Check the README for the steps to install: https://github.com/redislabs-training/redis-sitesearch#installing

If you don't want to (or can't) use Docker, then you'll need to read through the different Dockerfiles to discover all the commands necessary to install each part (the "worker," web API, etc.). Here's the worker's Dockerfile: https://github.com/redislabs-training/redis-sitesearch/blob/master/docker/app/Dockerfile

The specific error you reported is usually related to missing the development headers for Python, something that a command like apt install python-dev on Ubuntu might fix (or yum install python-devel on RHEL/Fedora, etc. But I'm afraid I'm not familiar with Oracle Linux!

DineshGuptaa commented 2 years ago

Hi Abrookins,

I tried this time docker one. When I ran the command sudo docker-compose up --build got below error:

WARNING: The PWD variable is not set. Defaulting to a blank string.
Creating network "redis-sitesearch_default" with the default driver
Building redis
Sending build context to Docker daemon  2.718MB
Step 1/2 : FROM redislabs/redisearch:latest
latest: Pulling from redislabs/redisearch
b4d181a07f80: Pull complete
1342f34fd0fb: Pull complete
1b2f304ef33e: Pull complete
50928b3873fb: Pull complete
f9edd3ed2f5a: Pull complete
afea93ae0bf4: Pull complete
5941672f8c08: Pull complete
8d6a92b46683: Pull complete
ae0ceb5821fe: Pull complete
82b389cc9637: Pull complete
78122b413d02: Pull complete
Digest: sha256:bc8368f16162624a83e0ebf16af4f5e177102fd3c237016bfff258d32bed6f5a
Status: Downloaded newer image for redislabs/redisearch:latest
 ---> d1764f209e9e
Step 2/2 : CMD redis-server --requirepass $REDIS_PASSWORD --dir /data --loadmodule /usr/lib/redis/modules/redisearch.so MINPREFIX 1
 ---> Running in 258ad35a0936
Removing intermediate container 258ad35a0936
 ---> 10ba400bd87f
Successfully built 10ba400bd87f
Successfully tagged redis-sitesearch_redis:latest
Building app
Sending build context to Docker daemon  2.718MB
Step 1/21 : FROM python:3.8
3.8: Pulling from library/python
bb7d5a84853b: Pull complete
f02b617c6a8c: Pull complete
    ...
    ...
    ...
    ...
    ...
    ...

Step 18/21 : ENV NEW_RELIC_APP_NAME "sitesearch"
 ---> Using cache
 ---> 0c676602a53c
Step 19/21 : ENV NEW_RELIC_DISTRIBUTED_TRACING_ENABLED true
 ---> Using cache
 ---> b3aa6d16ba0f
Step 20/21 : ENV NEW_RELIC_LOG stdout
 ---> Using cache
 ---> 3bf0f7db955e
Step 21/21 : ENTRYPOINT ["/usr/bin/supervisord"]
 ---> Using cache
 ---> 0a7daa1d8dff
Successfully built 0a7daa1d8dff
Successfully tagged redis-sitesearch_test:latest
Creating redis-sitesearch_test_redis_1 ... done
Creating redis-sitesearch_redis_1      ... done
Creating redis-sitesearch_worker_1     ... error
Creating redis-sitesearch_app_1        ...

ERROR: for redis-sitesearch_worker_1  Cannot create container for service worker: create .: volume name is too short, names should be at least two alphanumericCreating redis-sitesearch_app_1        ... error

ERROR: for redis-sitesearch_app_1  Cannot create container for service app: create .: volume name is too short, names should be at least two alphanumeric characters
Creating redis-sitesearch_test_1       ... error

ERROR: for redis-sitesearch_test_1  Cannot create container for service test: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for worker  Cannot create container for service worker: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for app  Cannot create container for service app: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for test  Cannot create container for service test: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.

Please help me... Thanks,