Pavel Velikhov wrote: > On Tuesday, 1 November 2016 12:50:37 UTC+3, Peter Otten wrote: >> Pavel Velikhov wrote: >> >> > We have released PythonQL, a query language extension to Python (we >> > have extended Python’s comprehensions with a full-fledged query >> > language, >> > drawing from the useful features of SQL, XQuery and JSONiq). Take a >> > look at the project here: http://www.pythonql.org and lets us know what >> > you think! >> >> I would really like Python to get seamless integration of SQL, so I >> applaud your effort! >> >> The demo on your web page is too noisy for my taste, so I went ahead and >> installed the python3 version in a virtual env. >> > > Great! Yes, we're hoping this will be useful to folks that like SQL and > other query languages. > >> My first attempt failed because of a missing ply; maybe you can fix that. >> Now off to the tutorial... > > Oops, I have tested with virtual env and ply was installing just fine, > wierd. Any hints on why it didn't pick it up during the installation?
I don't know enough about pip to make sense of it, but here's what I see: $ virtualenv -p python3 tmp_pyql Running virtualenv with interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in tmp_pyql/bin/python3 Also creating executable in tmp_pyql/bin/python Installing setuptools, pip...done. $ cd tmp_pyql/ $ . bin/activate If at this point I first run (tmp_pyql)$ run pip install ply installing pythonql3 will succeed. Otherwise: (tmp_pyql)$ pip install pythonql3 Downloading/unpacking pythonql3 Downloading pythonql3-0.9.43.tar.gz (41kB): 41kB downloaded Running setup.py (path:/home/peter/tmp_pyql/build/pythonql3/setup.py) egg_info for package pythonql3 Downloading/unpacking ply>=3.9 (from pythonql3) Downloading ply-3.9.tar.gz (150kB): 150kB downloaded Running setup.py (path:/home/peter/tmp_pyql/build/ply/setup.py) egg_info for package ply warning: no previously-included files matching '*.pyc' found anywhere in distribution Installing collected packages: pythonql3, ply Running setup.py install for pythonql3 Running post install task Running setup.py install for ply Failed to import the site module Traceback (most recent call last): File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 703, in <module> main() File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 683, in main paths_in_sys = addsitepackages(paths_in_sys) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 282, in addsitepackages addsitedir(sitedir, known_paths) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 204, in addsitedir addpackage(sitedir, name, known_paths) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 173, in addpackage exec(line) File "<string>", line 1, in <module> File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/codec/register.py", line 5, in <module> from pythonql.parser.Preprocessor import makeProgramFromString File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/parser/Preprocessor.py", line 3, in <module> from pythonql.parser.PythonQLParser import Parser, Node, print_program File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/parser/PythonQLParser.py", line 1, in <module> import ply.yacc as yacc ImportError: No module named 'ply' Complete output from command /home/peter/tmp_pyql/bin/python3 -c "import setuptools, tokenize;__file__='/home/peter/tmp_pyql/build/ply/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3yg_3xh1-record/install-record.txt --single- version-externally-managed --compile --install-headers /home/peter/tmp_pyql/include/site/python3.4: Failed to import the site module Traceback (most recent call last): File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 703, in <module> main() File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 683, in main paths_in_sys = addsitepackages(paths_in_sys) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 282, in addsitepackages addsitedir(sitedir, known_paths) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 204, in addsitedir addpackage(sitedir, name, known_paths) File "/home/peter/tmp_pyql/lib/python3.4/site.py", line 173, in addpackage exec(line) File "<string>", line 1, in <module> File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/codec/register.py", line 5, in <module> from pythonql.parser.Preprocessor import makeProgramFromString File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/parser/Preprocessor.py", line 3, in <module> from pythonql.parser.PythonQLParser import Parser, Node, print_program File "/home/peter/tmp_pyql/lib/python3.4/site- packages/pythonql/parser/PythonQLParser.py", line 1, in <module> import ply.yacc as yacc ImportError: No module named 'ply' ---------------------------------------- Cleaning up... Command /home/peter/tmp_pyql/bin/python3 -c "import setuptools, tokenize;__file__='/home/peter/tmp_pyql/build/ply/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3yg_3xh1-record/install-record.txt --single- version-externally-managed --compile --install-headers /home/peter/tmp_pyql/include/site/python3.4 failed with error code 1 in /home/peter/tmp_pyql/build/ply Storing debug log for failure in /home/peter/.pip/pip.log (tmp_pyql)$ If I were to guess: for some reason ply is installed after pythonql3. -- https://mail.python.org/mailman/listinfo/python-list