installation help dealing with Python module psutil #223
-
|
My apologies in advance if this isn't the right place for this question, but I couldn't find a more promising option. I'm wondering if anyone here can help me with some installation questions. I've been using Natlink/Dragonfly for several years, but this past week I've tried to reinstall on a new system, and it was the first time I've tried to use more recent versions of all of the various software layers here. That started with Dragon NaturallySpeaking 16. I downloaded and ran natlink5.5.7-py3.10-32-setup, and had it install Python 3.10.11 as part of the process. I tried to start up Dragon, I got the little window where it's reading in my Dragonfly files, and it complained about not being able to find "psutil". I was able to reproduce the same behavior by just running "C:\Program Files (x86)\Python310-32\python.exe" and then saying "import dragonfly". At that point, I tried following the instructions that said "Optionally install other Python packages via commandline with Natlink's python interpreter utilizing Natlink Python Environment". But if I find "Natlink Python Environment" and click on "Open", I get the following error: "The item 'python_envionment.bat' that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly". Based on experience from past natlink installations, I tried to deal with this situation by just doing a "pip install" of psutil. So that meant "'C:\Program Files (x86)\Python310-32\python.exe' -m pip install psutil", at which point it produced an error message saying that I needed to install Microsoft C++ Build Tools. So I did that, from https://visualstudio.microsoft.com/visual-cpp-build-tools, and the psutil installation eventually appeared to succeed. At that point, doing a "import dragonfly" in a command-line Python session worked, but Dragon didn't, giving me a Python stack trace and ultimately saying that the _psutil_windows module failed to load. I've tried using the Dependency Walker on the _psutil_windows.pyd file, but it really hasn't led me toward any specific solution. I am a software engineer, but I'm really not a Windows expert. So at this point I'm wondering:
Any help you can offer would be greatly appreciated, and I'm happy to provide more details. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
No that should not be an issue
There's nothing special about "Natlink Python Environment" and simply a convenience especially if Python isn't on path. Essentially "'cmd /k cd C:\Program Files (x86)\Python310-32" This must be failing :/ natlink/InstallerSource/inno-code.iss Line 236 in 3175241
if you have 64 bit Python installed I'd be curious to know if it also has psutil installed? Did you install python with the installer or before the installer? https://github.com/dictation-toolbox/natlink/blob/master/docs/debugging.md |
Beta Was this translation helpful? Give feedback.
-
|
My guess is that this error is caused by the "DISPLAY" environment variable being set someplace. The master branch version of Dragonfly, which I need to publish a proper release of, handles this variable a bit better. Please try the command-line incantation below, restart Dragon and let us know if that fixes the problem.
pip uninstall dragonfly2
pip install git+https://github.com/dictation-toolbox/dragonfly.git
|
Beta Was this translation helpful? Give feedback.
-
|
Reinstalling dragonfly from github did in fact fix that problem. So at this point things are generally working. Given that my existing dragonfly-based Python code was based on a release from several years ago, I had to modify or comment out a few things in order to push through to success, but nothing really problematic, and I can continue to sort through those things as time goes on. Thanks to all of you for your help! |
Beta Was this translation helpful? Give feedback.
Reinstalling dragonfly from github did in fact fix that problem.
So at this point things are generally working. Given that my existing dragonfly-based Python code was based on a release from several years ago, I had to modify or comment out a few things in order to push through to success, but nothing really problematic, and I can continue to sort through those things as time goes on.
Thanks to all of you for your help!