# PyKX license error

**URL:** <https://forum.kx.com/t/pykx-license-error/12932>\
**Category:** Community Support\
**Tags:** pykx\
**Created:** [July 11, 2023, 8:47pm UTC](https://forum.kx.com/t/pykx-license-error/12932 "2023-07-11T20:47:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhgkinds1](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jhgkinds1](https://forum.kx.com/u/jhgkinds1)\
**Post date:** [July 11, 2023, 8:47pm UTC](https://forum.kx.com/t/pykx-license-error/12932/1 "2023-07-11T20:47:00Z")

</div>

Dear KX community,

I did a fresh install of q on windows with a new license file.

Q works ok.

But after installing PyKX v1.6 it remains saying "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/  
Full installation instructions can be found at 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 for more information on licensed vs unlicensed modalities.  
Captured output from initialization attempt:  
'2023.07.11T21:46:14.219 licence error: k4.lic

I have put QLIC and QHOME in my environment variables, but nothing helps.

Any solution?

---

<div class="post-metadata">

**Author:** ![rocuinneagain1](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@rocuinneagain1](https://forum.kx.com/u/rocuinneagain1)\
**Post date:** [July 11, 2023, 10:06pm UTC](https://forum.kx.com/t/pykx-license-error/12932/2 "2023-07-11T22:06:00Z")

</div>

Can you run these 2 commands in your command prompt and share the output?

&nbsp;

set QARGS=“–unlicensed” python -c “import pykx;pykx.util.debug\_environment()”

&nbsp;

&nbsp;

This is the output for me:

&nbsp;

**PyKX information** pykx.args: (‘–unlicensed’,) pykx.qhome: C:\q pykx.qlic: C:\q pykc.licensed: False pykx. **version** : 1.6.0 pykx.file: C:\Users\rocuinneagain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10\_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pykx\util.py **Python information** sys.version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] pandas: 1.5.3 numpy: 1.25.0 pytz: 2022.7.1 which python: C:\Users\rocuinneagain\AppData\Local\Microsoft\WindowsApps\python.EXE which python3: C:\Users\rocuinneagain\AppData\Local\Microsoft\WindowsApps\python3.EXE **Platform information** platform.platform: Windows-10-10.0.19045-SP0 **Environment Variables** IGNORE\_QHOME: KEEP\_LOCAL\_TIMES: PYKX\_ALLOCATOR: PYKX\_ENABLE\_PANDAS\_API: PYKX\_GC: PYKX\_LOAD\_PYARROW\_UNSAFE: PYKX\_MAX\_ERROR\_LENGTH: PYKX\_NOQCE: PYKX\_Q\_LIB\_LOCATION: PYKX\_RELEASE\_GIL: PYKX\_Q\_LOCK: QARGS: “–unlicensed” QHOME: C:\q QLIC: C:\q PYKX\_DEFAULT\_CONVERSION: SKIP\_UNDERQ: UNSET\_PYKX\_GLOBALS: **License information** pykx.qlic directory: True pykx.lic writable: True pykx.qhome lics: [‘k4.lic’, ‘kc.lic’] pykx.qlic lics: [‘k4.lic’, ‘kc.lic’] **q information** which q: C:\q\w64\q.EXE q info: (`w64;4f;2023.04.17) “insights.lib.embedq insights.lib.pykx insights.lib.sql insights.lib.qlog insights.lib.kurl insights.lib.objstore insights.lib.bigquery insights.lib.restserver”

&nbsp;

&nbsp;

Note:

- QLIC must point to the folder containing the licence, it should not point to the the file itself.
- The license needs to have the flags&nbsp;&nbsp;`insights.lib.embedq` `insights.lib.pykx`

&nbsp;

- _Creating q code block with syntax highlighting in a message_ 
- _Adding inline code to questions_ 

&nbsp;
