Skip to content

[Bug] ImportError: cannot import name 'broadcast_to' from 'numpy.lib.stride_tricks' #4294

Open
@Sparshcodies

Description

@Sparshcodies

Describe the bug

File ~/Sparsh/myenv/lib/python3.10/site-packages/numpy/lib/twodim_base.py:14
12 from numpy.core import overrides
13 from numpy.core import iinfo
---> 14 from numpy.lib.stride_tricks import broadcast_to
17 all = [
18 'diag', 'diagflat', 'eye', 'fliplr', 'flipud', 'tri', 'triu',
19 'tril', 'vander', 'histogram2d', 'mask_indices', 'tril_indices',
20 'tril_indices_from', 'triu_indices', 'triu_indices_from', ]
23 array_function_dispatch = functools.partial(
24 overrides.array_function_dispatch, module='numpy')

ImportError: cannot import name 'broadcast_to' from 'numpy.lib.stride_tricks' (/home/ssahu/Sparsh/myenv/lib/python3.10/site-packages/numpy/lib/stride_tricks.py)

To Reproduce

pip install TTS

Expected behavior

No response

Logs

Environment

{
    "CUDA": {
        "GPU": [
            "NVIDIA RTX A4000"
        ],
        "available": true,
        "version": "12.4"
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.6.0+cu124",
        "TTS": "0.22.0",
        "numpy": "1.22.4"
    },
    "System": {
        "OS": "Linux",
        "architecture": [
            "64bit",
            "ELF"
        ],
        "processor": "x86_64",
        "python": "3.10.12",
        "version": "#149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025"
    }
}

Additional context

For the deafault installation of TTS library we need to use numpy==1.22.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions