Skip to content

Cannot import flux.resource #13

@jwhite242

Description

@jwhite242

Checked this on a couple machines and virtualenviornments to ensure it wasn't a fluke. I am trying to import the resource list (https://flux-framework.readthedocs.io/projects/flux-core/en/stable/python/autogenerated/flux.resource.list.html) to do a little checking/logging on the instance I'm looking to submit some jobs to (also precursor to playing with hierarchical scheduling where i need to know the size to pick one). It returns a module not found error. Simple reproducer below:

In [7]: import flux.resource.list as frl
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[7], line 1
----> 1 import flux.resource.list as frl

File /path/to/myvenv/lib/python3.11/site-packages/flux/resource/__init__.py:11
      1 ###############################################################
      2 # Copyright 2020 Lawrence Livermore National Security, LLC
      3 # (c.f. AUTHORS, NOTICE.LLNS, COPYING)
   (...)      8 # SPDX-License-Identifier: LGPL-3.0
      9 ###############################################################
---> 11 from flux.resource.Rlist import Rlist
     12 from flux.resource.ResourceSet import ResourceSet
     13 from flux.resource.list import resource_list, SchedResourceList

File /path/to/myvenv//lib/python3.11/site-packages/flux/resource/Rlist.py:15
     12 import socket
     13 from collections.abc import Mapping
---> 15 from _flux._rlist import ffi, lib
     16 from flux.hostlist import Hostlist
     17 from flux.idset import IDset

ModuleNotFoundError: No module named '_flux._rlist'

Note that i can successfully import flux and query brokers for their version (import flux, fh = Flux(), fh.attr_get...), so the bindings are installing ok, just missing something? Tried it on two of the El Cap prototypes in case that matters, one was at flux version 0.70.0, the other at 0.71.0 (no bindings for the latter, but same error so not the cause).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions