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

Re: [HTCondor-users] Python query: boost error



Brendan,

Just to quickly follow up on using conda, I use a conda env just to quickly put together a clean Python 3.6 environment to run "pip install" in. If you're using conda anyway for managing your python libraries, I'd would recommend installing the bindings via the python-htcondor package from conda-forge instead of installing the bindings via pip:

conda install -c conda-forge python-htcondor

IMO, conda does a better job of non-Python dependency management than PyPI's strategy of forcing all non-Python dependencies to be shoved into the wheel (aka pip package).

Jason

On 11/17/21 4:29 PM, Brendan Holmes wrote:

Hi Jason,

 

Yes I switched to installing everything using conda and now itâs working ð

 

Thanks for your response,

Brendan

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Jason Patton
Sent: 17 November 2021 21:28
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] Python query: boost error

 

Hi Brendan,

The Python bindings that get installed via pip were statically linked with boost when they were built, so changing boost on your system shouldn't have an impact on this issue. I notice that your error points to a system-level pip install. Was HTCondor also installed on this machine by other means (e.g. yum/apt)?

I haven't been able to reproduce this in a Python 3.6 REPL (inside an otherwise bare Anaconda environment on CentOS 7), is there any other context we might be missing?

 

(py36) [jcpatton@submit2 ~]$ python -V
Python 3.6.13 :: Anaconda, Inc.
(py36) [jcpatton@submit2 ~]$ pip install htcondor==9.3.0
Collecting htcondor==9.3.0
  Using cached htcondor-9.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (31.0 MB)
Installing collected packages: htcondor
Successfully installed htcondor-9.3.0
(py36) [jcpatton@submit2 ~]$ python
Python 3.6.13 |Anaconda, Inc.| (default, Jun  4 2021, 14:25:59)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import classad
>>> import htcondor
>>> coll = htcondor.Collector()
>>> ads = coll.query(htcondor.AdTypes.Schedd, "true", ["Name"])
>>> len(ads)
50
>>> ads[0]
[ Name = "<snipped>.wisc.edu" ]

 

Jason Patton

On 11/17/21 10:50 AM, Brendan Holmes wrote:

Hi,

 

Iâm seeing a boost error when trying to run a query:

 

import classad

import htcondor

coll = htcondor.Collector()

coll.query(htcondor.AdTypes.Schedd, 'true', ['Name'])

 

----> 1 coll.query(htcondor.AdTypes.Schedd, 'true', ['Name'])

/usr/lib64/python3.6/site-packages/htcondor/_lock.py in wrapper(*args, **kwargs)

     67             acquired = LOCK.acquire()

     68

---> 69             rv = func(*args, **kwargs)

     70

     71             # if the function returned a context manager,

 

TypeError: No to_python (by-value) converter found for C++ type: boost::shared_ptr<ClassAdWrapper>

 

 

Apparently this was introduced by a breaking change in boost v1.60, but Iâve tried installing various versions of boost, older and newer than this and are getting the same issue.  Classad is v0.4.1 and htcondor is v9.3.0.  I installed using pip install htcondor

 

Any ideas?  Many thanks,

Brendan

 

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
 
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/