Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

build_ext recipe for setup.py fails with TF2.2 and python3.7 #22

@mshaikh786

Description

@mshaikh786

Hello Jonathan,
I got your email contact from the Dockerfile for circle CI in the release tarball of nvtx-plugins 0.1.8

I tried to pip install nvtx-plugins and when importing the module got an error:

python -c ‘import nvtx.plugins.tf’
2020-12-01 18:08:42.618635: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2
Traceback (most recent call last):
 File “<string>“, line 1, in <module>
 File “/sw/csgv/dl/apps/nvtx_plugins/0.1.8/lib/python3.7/site-packages/nvtx/plugins/tf/__init__.py”, line 33, in <module>
  import nvtx.plugins.tf.ops
 File “/sw/csgv/dl/apps/nvtx_plugins/0.1.8/lib/python3.7/site-packages/nvtx/plugins/tf/ops.py”, line 29, in <module>
  nvtx_tf_ops = load_library(‘lib/nvtx_ops’ + get_ext_suffix())
 File “/sw/csgv/dl/apps/nvtx_plugins/0.1.8/lib/python3.7/site-packages/nvtx/plugins/tf/ext_utils.py”, line 54, in load_library
  library = _load_library.load_op_library(filename)
 File “/sw/csgv/dl/apps/tensorflow/2.2/lib/python3.7/site-packages/tensorflow/python/framework/load_library.py”, line 58, in load_op_library
  lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /sw/csgv/dl/apps/nvtx_plugins/0.1.8/lib/python3.7/site-packages/nvtx/plugins/tf/lib/nvtx_ops.cpython-37m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

I assume build_ext need to be run to produce this Cpython object, however

python setup.py build_ext
fails with the following error:
-bash-4.2$ python setup.py build_ext
Traceback (most recent call last):
  File "setup.py", line 186, in <module>
    keywords=__keywords__,
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/distutils/core.py", line 134, in setup
    ok = dist.parse_command_line()
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/site-packages/setuptools/dist.py", line 703, in parse_command_line
    result = _Distribution.parse_command_line(self)
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/distutils/dist.py", line 483, in parse_command_line
    args = self._parse_command_opts(parser, args)
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/site-packages/setuptools/dist.py", line 1018, in _parse_command_opts
    nargs = _Distribution._parse_command_opts(self, parser, args)
  File "/sw/csgv/dl/apps/intelpython3/2020.0.014/lib/python3.7/distutils/dist.py", line 545, in _parse_command_opts
    if not issubclass(cmd_class, Command):
TypeError: issubclass() arg 1 must be a class

Any clues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions