This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying
to this email.
On 11/29/2021 7:31 AM, SACK Daniel via HTCondor-users wrote:
I’ve been using the htcondor CLI for some time on my Windows system, and wanted to begin automating
some things with Python. This system has a simple htcondor installation (9.4.0) up and running fine, but any time I try to run
“import htcondor”, I get the following error:
>>> import htcondor
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\condor\lib\python\htcondor\__init__.py", line 54, in <module>
from . import htcondor, _lock
ImportError: DLL load failed while importing htcondor: The specified module could not be found.
Clearly it is finding the files in C:\Condor\lib\python, but then it is failing to import the modules correctly. This happens whether running through conda OR in a vanilla python shell. I can’t
find anything about this on the net – do you have any idea what would cause this?
A couple of thoughts:
1. What version of Python do you have installed on your Windows machine? I.e. what does "python --version" return? At this time, the Windows binaries from the HTCondor website are compiled against version Python 3.6.x 64-bit, so there could be issues if
you use a different Python version. Perhaps you are running a different version of Python than v3.6.x ? (fwiw, my Windows 10 laptop has Python 3.6.6 installed and the HTCondor python bindings work fine)
2. It appears that it is finding the modules, but just in case, confirm that your PYTHONPATH environment variable includes the following two directories, like so (assuming you installed HTCondor in the default location of c:\condor):
Hope the above helps