I am trying to run q commands through a jupyter notebook. However, I am running into the exception, whenever I am using pykx.q.
LicenseException: A valid q license must be in a known location (e.g. `$QLIC`) to run q code via 'pykx.q'.
Even while importing, I am encountering the issue
<frozen importlib._bootstrap>:241: PyKXWarning: Failed to initialize PyKX fully licensed functionality. To access all functionality of PyKX please download an evaluation license from[https://kx.com/kdb-insights-personal-edition-license-download/]("https://kx.com/kdb-insights-personal-edition-license-download/")Full installation instructions can be found at[https://code.kx.com/pykx/getting-started/installing.html]("https://code.kx.com/pykx/getting-started/installing.html")Falling back to unlicensed mode, which has limited functionality. Refer to[https://code.kx.com/pykx/user-guide/advanced/modes.html]("https://code.kx.com/pykx/user-guide/advanced/modes.html")for more information on licensed vs unlicensed modalities. Captured output from initialization attempt: '2023.08.08T18:49:30.065 licence error: embedq
I am able to use q through CLI normally. The license file is there. But somehow the exception pops up whenever I am trying to run q commands through pykx.q. I have made sure that QHOME and QLIC are pointing to the folder containing kc.lic file.
Any help or guidance to fix this issue will be great.
.e.g if you have a maintenance expiry date of 2021.12.31 but a licence expiry of 2022.06.01 this means you can use kdb+ up to 2022.06.01 as long as the version of kdb+ was released before 2021.12.31
The dates of your licence are included in the email you got from licadmin@kx.com
As of 1.6.0 PyKX is based on 2023.04.17 version of q
I checked for the flags but I got an empty string for the command.
I also ran python -c “import pykx;pykx.util.debug_environment()”, based on one of previous answer. There also I got an empty string where flags are expected.
However, I think the license is not an older version as I got it just a few days back.
I updated the license from here. Now I can see the flags by running .z.l 4 in q.
However, I am running into a new problem when executing python -c “import pykx;pykx.util.debug_environment()” as shown in the screenshot below. Same error message pops up if I am importing it in python.
I tried with python3.exe, but the behaviour remains same. I can import in unlicensed mode but it fails with licensed mode throwing .nyi error.
I installed pykx using pip. I have tried it with different versions of python, i.e. 3.9.6 and 3.8 in different conda environments. They both are behaving similarly.