| Hi David
I am really confused now. Because this was my whole problem. Under uv, it was indeed that the package name was htcondor, but once I specified that, I could say âimport htcondor2â and it worked. NOW, using just pip, and pip install htcondor, I can only do âimport htcondorâ - âimport htcondor2â DOES NOT WORK so neither would import htcondor2 as htcondor.
I dove into the pip installed package and âgrep htcondorâ turned up lots of hits, while âgrep htcondor2â comes up empty.
How is this supposed to work?
$ python Python 3.6.8 (default, Aug 26 2025, 19:38:32) [GCC 8.5.0 20210514 (Red Hat 8.5.0-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import htcondor2 Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'htcondor2' >>> import htcondor
Neither the environment variable CONDOR_CONFIG, /etc/condor/, /usr/local/etc/, nor ~condor/ contain a condor_config source. Either set CONDOR_CONFIG to point to a valid config source, or put a "condor_config" file in /etc/condor/ /usr/local/etc/ or ~condor/ >>> htcondor.version() '$CondorVersion: 10.3.1 2024-10-11 BuildID: UW_Python_Wheel_Build $â
JT
On 27 Oct 2025, at 16:15, David Schultz <david.schultz@xxxxxxxxxxxxxxxx> wrote:
Hi JT,
The magic import statement is
import htcondor2 as htcondor
This makes most old code "just work," though there are several places it doesn't. More details are in https://htcondor.readthedocs.io/en/latest/apis/python-bindings/api/version2/migration-guide.html
Best, David
On Mon, Oct 27, 2025 at 10:06âAM Jeff Templon <templon@xxxxxxxxx> wrote: Hi David,
Thanks for the explanation.
Any idea why I get this behavior?
Traceback (most recent call last): File "./bin/gv-dbupdate", line 62, in <module> schedds = coll.locateAll(htcondor.DaemonType.Schedd) AttributeError: module 'htcondor' has no attribute 'DaemonType'
This worked with the htcondor2 bindings available via uv but does not work with whatâs in pip, hence (along with the missing 2) my assumption that I had the wrong version.
JT
On 27 Oct 2025, at 15:45, David Schultz <david.schultz@xxxxxxxxxxxxxxxx> wrote:
Hi JT,
The simple answer is that the Pypi name didn't change, it's still "htcondor". They added the htcondor2 module to that Pypi install. And for version 25 or greater it no longer provides the old htcondor module, which gets confusing.
Best, David
On Mon, Oct 27, 2025 at 9:38âAM Jeff Templon <templon@xxxxxxxxx> wrote: Yo,
Uv was doing the right thing wrt condor bindings but dependencies on another tool forced me to go the old fashioned way and use pip. Pip appears to provide the old v1 bindings and not v2, and pip install htcondor2 comes up empty.
This may have already been answered here, I saw lots of messages about stuff in Pypi and blissfully ignored them, thinking HAH BUT I HAVE UV.
J âfoiled againâ T
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/
_______________________________________________ HTCondor-users mailing list To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a subject: Unsubscribe
The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/
_______________________________________________ HTCondor-users mailing list To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a subject: Unsubscribe
The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/
|