-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create version of PyQ for Windows? #1
Comments
We have no plans to support Windows at the moment. The major supported platforms are MacOS and Linux while we had some success with Solaris and FreeBSD. The code itself should compile without any problems on Windows, but some changes will be required |
Experimental support for Windows has landed with the PyQ 4.1.0.Ensure that kdb+ is installed under Then, you can install PyQ on Windows using pip install -U pyq You can start PyQ by running
Note, you will have to press You can run tests too: first install required packages: pip install pytest pytest-pyq Then run:
We appreciate all bug reports and any feedback. |
Thanks so much for this release - this is a very good feature. My installation fails with below error. Is this because I'm using 64-bit q.exe version? Python version : 3.5.2 Error -
|
Hi @bevinahal, Thank you for your report. I don't think 64bit is an issue here. More likely it is your use of kdb+ 3.1. We only fully tested PyQ with the latest (3.5, 32bit) kdb+, but it does compile with (3.5, 64bit) as well. The problem is that with kdb+ < 3.5, PyQ uses an undocumented
If you decide to take option (3), see "Installing from Source Code" instructions. |
Dear @chenkangcrack, Thank you for your report. For the 4.1 release, we've only tested PyQ on Windows with Python 3.6. However, it looks like only a minor change is needed to make it compile under Python 2.7. I am attaching the necessary patch. To apply, clone this repository, download the attachment and run git apply 0001-BUG-946-Fixed-compilation-errors-for-Python-2.7-on-W.patch.txt You should then be able to install pyq with
Please let us know if you have any other issues. We will include these changes in the next bug-fix release. 0001-BUG-946-Fixed-compilation-errors-for-Python-2.7-on-W.patch.txt |
@chenkangcrack Please try to start PyQ as described above by running When installing PyQ, please use Command Prompt, not git/mingw shell. You might need to install Visual Studio 9 for Python if using Python 2.7.x, and |
Hi @chenkangcrack, Thank you for trying the patch. Please note that PyQ runs Python inside a kdb+ process and cannot be loaded in a standard Python. To start an interactive session, please enter the following command:
As explained above, you will have to press Control+Z and then Enter keys to break out of the kdb+ REPL and start entering Python commands. (When running python scripts, redirect STDIN to To make sure you've succeeded in building PyQ, please run the included test suit:
|
This is error I got.
|
After failing to launch it in python36 above (the pyq crashed) I tried to do it in python 27 as you described, got the error and cannot start it.
Is it because my python is installed in F driver? Thanks a lot. |
Dear @ghlian, It looks like you are using conda. We have not tested PyQ with it. I suggest that you install the official CPython distribution from https://www.python.org/downloads/windows/. For the 32-bit version, choose "Download Windows x86 MSI installer". |
Dear @ghlian, I've just downloaded Miniconda3 (32bit) and successfully installed pyq:
There was a slight problem running tests: the standard pytest package had a trouble parsing Anaconda Python version:
As a work-around, I ran pytest in a "quiet" mode:
Overall, it seems to work for me. I suspect you have some custom modifications in your Anaconda installation. Can you try to install a fresh version of Miniconda3? Please make sure that you use 32bit Python with 32bit q. |
Thanks very much. I did get it installed and run when python is installed in C driver. But when it is installed in other driver. You get the error.
|
@ghlian, the problem that you see does not look like anything specific to pyq. It looks like an issue with pip. I don't have a Windows setup with multiple drives at the moment, but I would suggest that you try to set the TMPDIR environment variable to some path on the |
Thank you!! |
Try
Make sure that there is no space between
This is necessary because You may also want to install the |
Is there any problem with the specification here
The jupyter was launched but the kernel of pyq cannot be started with the error
|
Exception report at Windows 10, KDB+ 3.5 2017.03.15
|
@hzadonis, it looks like your pip process is having trouble displaying the progress bar. Please try running it in silent mode by adding the |
@ghlian -
Yes, first I believe json requires that backslashes are escaped. (Double every backslash in the file paths.) Second, make sure the environment variable QBIN is set to the full path to |
Installing Jupyter kernelSince we have not ported the First, it is strongly recommended to use a dedicated Python virtual environment and install
Now you should be able to install jupyter, pyq and pyq-kernel in one commad
Finally, to install pyq kernel specs, run
If everything is successful, you should see pyq_3 listed in the kernelspec list:
Now, start the notebook server
and select "PyQ 3" from the "New" menu. For examples of what can be done in a PyQ notebook, please see my presentation at https://youtu.be/v2UoP0l6mOw. |
Thank. I figured out the problem is the file "pyq-kernel.p" is not accessible by pyq. Specifying the full path solves the problem. |
@abalkin |
Yes, as long as you don't load Once you have pyq-kernel running inside your q process, you can connect a Jupyter notebook or an IPython console to it as well as qcon or any q IDE that can talk to a kdb+ server. |
Create lgtm.yml (#1) * Create lgtm.yml Basic lgtm configuration based on the example [1]. [1]: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file#example-lgtm.yml-file * Removed the configure command in lgtm.yml * Replace lgtm.yml with a simple version Thanks, Arthur Baars. * Attempt a full build in lgtm.yml Update pyq.c Generate C coverage Pass compiler defaults to build exe compiler Pass coverage flags via CC Restore LDFLAGS. Separate travis build commands in a separate file. Added enlnt channel to the conda install command. Fixed flags. More requirements Fix requirements Fix build More C coverage Add 64-bit environment Send license Fix conda 32-bit settings. Try using kdb+ from conda Added osx builds Update build.sh Added diagnostic. BUG Resolves #1008 Added logic to find Python DLL from sysconfig. Clean-up * Use new style of conda initialization * Do not download kdb outside of getkdb.sh script Allow failures on osx Do not download PSF python Specify language c Fix TST #703 Fixed tests that required VIRTUAL_ENV to be set. Fix conda download on macOS fix Fix base64 decode option Do not use -lgcov on macOS Fix pyq.c
Wonder if anyone see this error? Windows 10 64bit KDB 32bit newest version. Could it be that the visual studio C++ build tools has some problem? Thanks!
|
@jtzharry Could you please share the command you used to get this error message? Did you use virtual environment? Which version of Python did you use? Which version of kdb+ did you use (i.e. 32-bit or 64-bit)? |
@sashkab I am using this script:
I had an issue earlier saying visual c++ build tools is not installed, then I download from here: |
@jtzharry You don't need to use |
@sashkab Thanks, changed to pip install pyq does not help, I think I am using 64bit Python. |
You need to use 32-bit python if you use 32-bit kdb+. You can download it from python.org (select Windows x86 executable installer). |
@sashkab Thanks and sorry for the late reply, I am able to install pyq through a 32-bit virtualenv with the 32BIT turned on. |
@jtzharry thanks for confirmation. |
@wjm3333 Could you please type after starting PyQ following: >>> import pyq
>>> pyq.versions() |
I am using this script:
|
|
Your error is expected. You can launch PyQ on windows only by following instructions outlined above. Importing pyq in vanilla Python is not supported. |
Thank you for your reply. I did as you suggested. The result of starting PYQ did not report an error, but the input of 9 + 7 operation could not display the result.
All inputs cannot display results on the next line,why? |
I am trying to run pyq in windows as instructions, but I am getting the following error:
Can someone help? |
@jmsblah please uninstall pyq |
(base) C:\Users\deep_bedford>C:\q\w64\q.exe python.q Fatal Python error: Py_Initialize: unable to load the file system codec Current thread 0x0000cce0 (most recent call first): please help me to resolve the issue |
@decranfield1 It seems there are issues with your Python installation. Perhaps, you should re-create virtual environment and try re-installing PyQ again, following our instructions above. |
(base) C:\Users\deep_bedford>C:\Users\deep_bedford\Anaconda3\q\w64\q.exe python.q ^Z 'pyq_executable )python I am not understanding what is wrong now ? |
How did you install PyQ? It seems you're not following instructions. As you use Anaconda, you should install it with conda install -c kx -c enlnt pyq |
conda install -c kx -c enlnt pyq PackagesNotFoundError: The following packages are not available from current channels:
Current channels:
To search for alternate channels that may provide the conda package you're
and use the search bar at the top of the page. Somehow conda is not working |
Stale issue message |
KDB+ 3.6 2019.06.09 Copyright (C) 1993-2019 Kx Systems Python 3.7.0
KDB+ 3.6 2019.06.09 Copyright (C) 1993-2019 Kx Systems Fatal Python error: _Py_InitializeCore: main interpreter already initialized Current thread 0x0005f078 (most recent call first):
Microsoft Windows [Version 10.0.18363.693] |
@FlyingOE please open new issue and provide detailed steps to reproduce this. |
Hi
I am evaluating kdb+/q for use in managing large data volumes for an investment process and was keen on utilising PyQ to help manage data wrangling into a kdb database. I am restricted to operating on Windows and noticed that the pip install or build from source won't work as it is written only for Unix variants OSs. Is there any chance this could be extended to Windows? I'd have a crack at it myself, but my programming skills not that extensive .. Would it require much work to adjust to compile on WIndows? I am running Python 3.4
The text was updated successfully, but these errors were encountered: