dictation-toolbox / natlink

Natlink provides the interface between Dragon and python
Other
25 stars 17 forks source link

natlinkcore site package should be added to python path #60

Closed MarkRx closed 2 years ago

MarkRx commented 3 years ago

In order for dragonfly to import natlink when running the Run_Caster_DNS.bat script it needs to be directly accessible. I think this can be done by putting it on the python path using a module.pth file in the natlink python module.

https://docs.python.org/3/library/site.html

Without the module on the path it fails with this:

C:\voice\caster>Run_Caster_DNS.bat Running DNS/DPI from Dragonfly CLI with Natlink. WARNING:engine.natlink:Requested engine 'natlink' is not available: Natlink is not installed: No module named 'natlink' ERROR:command:Requested engine 'natlink' not available. Press any key to continue . . .

The path can also manually be modified by setting the PYTHONPATH variable:

set PYTHONPATH=C:\Python\Python38-32\Lib\site-packages\natlinkcore

dougransom commented 3 years ago

I think this is an undesirable solution - think of it as a workaround.

I suspect what is going on is the dependent packages have not been updated since natlink moved to qualified imports. I think the issue should be reported in caster or other dependent packages.

quintijn commented 3 years ago

Well, from the new version of natlink, the import should go different:

from natlinkcore import natlink

Please try, and remove the set PYTHONPATH line above...

MarkRx commented 3 years ago

Created https://github.com/dictation-toolbox/dragonfly/issues/354

LexiconCode commented 2 years ago

Closing as this is being addressed in dragonfly