KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
191 stars 49 forks source link

Unable to install pyq on py3.6 venv #143

Closed perfecto25 closed 3 years ago

perfecto25 commented 3 years ago

Questions

Steps to reproduce the issue

(venv) dev@titan ]$ pip install --proxy http://208.224.250.5:3128  -i https://pyq.enlnt.com --no-binary pyq pyq
Collecting pyq
  Using cached https://github.com/enlnt/pyq/archive/pyq-4.1.1.tar.gz
Installing collected packages: pyq
  Running setup.py install for pyq ... error
    Complete output from command /home/qbdev/mreider/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-40mskgze/pyq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-guulz17f-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/qbdev/mreider/venv/include/site/python3.6/pyq:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/version.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/ptk.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/magic.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/conftest.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/cmd.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/_pt_run.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/_n.py -> build/lib.linux-x86_64-3.6/pyq
    copying src/pyq/__init__.py -> build/lib.linux-x86_64-3.6/pyq
    creating build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_version.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_threads.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_sd.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_q.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_python_q.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_pyq_executable.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_pypath.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_pathlib.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_p.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_numpy.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_no_numpy.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_n.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_memoryview.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_magic.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_k.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_com.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/test_ci.py -> build/lib.linux-x86_64-3.6/pyq/tests
    copying src/pyq/tests/__init__.py -> build/lib.linux-x86_64-3.6/pyq/tests
    running build_ext
    building 'pyq._k' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    creating build/temp.linux-x86_64-3.6/src/pyq
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DKXVER=4 -DKXVER2=0 -I/home/qbdev/mreider/venv/include -I/usr/include/python3.6m -c src/pyq/_k.c -o build/temp.linux-x86_64-3.6/src/pyq/_k.o -Wpointer-arith -Werror -fno-strict-aliasing
    gcc -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64-3.6/src/pyq/_k.o -L/usr/lib64 -lpython3.6m -o build/lib.linux-x86_64-3.6/pyq/_k.cpython-36m-x86_64-linux-gnu.so
    running build_scripts
    creating build/scripts-3.6
    copying src/scripts/pyq-runtests -> build/scripts-3.6
    copying and adjusting src/scripts/pyq-coverage -> build/scripts-3.6
    copying src/scripts/ipyq -> build/scripts-3.6
    copying src/scripts/pq -> build/scripts-3.6
    copying src/scripts/qp -> build/scripts-3.6
    changing mode of build/scripts-3.6/pyq-coverage from 664 to 775
    changing mode of build/scripts-3.6/ipyq from 664 to 775
    changing mode of build/scripts-3.6/pq from 664 to 775
    changing mode of build/scripts-3.6/qp from 664 to 775
    running build_qlib
    creating build/qlib
    copying src/pyq/python.q -> build/qlib
    copying src/pyq/p.k -> build/qlib
    copying src/pyq/pyq-operators.q -> build/qlib
    running build_qext
    creating build/temp.linux-x86_64
    creating build/temp.linux-x86_64/src
    creating build/temp.linux-x86_64/src/pyq
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DKXVER=4 -DKXVER2=0 -DPY3K=36 -Isrc/pyq -c src/pyq/p.c -o build/temp.linux-x86_64/src/pyq/p.o -Wpointer-arith -Werror -fno-strict-aliasing
    creating build/qext.linux-x86_64
    gcc -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64/src/pyq/p.o -o build/qext.linux-x86_64/p.so
    running build_exe
    **gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DKXVER=4 -DQARCH=l64 -c src/pyq.c -o src/pyq.o -Wpointer-arith -Werror -fno-strict-aliasing
    src/pyq.c:2:0: error: "_GNU_SOURCE" redefined [-Werror]**
     #  define _GNU_SOURCE
     ^
    <command-line>:0:0: note: this is the location of the previous definition
    cc1: all warnings being treated as errors
    error: command 'gcc' failed with exit status 1
sashkab commented 3 years ago

Any reason you're installing this very old version of PyQ?

This issue has been fixed in PyQ 4.1.3, so perhaps install at least that version.

pip install pyq==4.1.3

Note -- no need to pass -i option any longer.

But I'd strongly suggest to use PyQ 5.0.