[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] import htcondor fails on windows

Hi Todd,


Thanks for the response. I was using python 3.8, so I created another environment in conda with python=3.6, and it worked!

Many thanks.


Best Regards,


Daniel Sack


From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
Sent: Tuesday, November 30, 2021 3:50 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: SACK Daniel <daniel.sack@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [HTCondor-users] import htcondor fails on windows


tannenba@xxxxxxxxxxx からのメールを受け取る頻度は高くありません。このことが重要である理由

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:

Hi All,


Ive 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 cant find anything about this on the net do you have any idea what would cause this?



Best Regards,


Daniel Sack


Hi Daniel,

I can
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):
    set PYTHONPATH=C:\condor\lib\python;C:\condor\bin
Hope the above helps