Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

AttributeError: module 'numpy' has no attribute 'int' when importing tacto #42

@thesofakillers

Description

@thesofakillers

Steps to reproduce

First, install tacto in a fresh environment as instructed

conda create -n reproduce python=3.8 -y
conda activate reproduce
pip install tacto

Then, see if it worked: try running this python script

import tacto

You get the following error:

pybullet build time: Apr 12 2023 14:39:48
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/tacto/__init__.py", line 6, in <module>
    from .renderer import Renderer  # noqa: F401
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/tacto/renderer.py", line 29, in <module>
    import pyrender
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/pyrender/__init__.py", line 10, in <module>
    from .scene import Scene
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/pyrender/scene.py", line 7, in <module>
    import networkx as nx
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/networkx/__init__.py", line 117, in <module>
    import networkx.readwrite
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/networkx/readwrite/__init__.py", line 15, in <module>
    from networkx.readwrite.graphml import *
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/networkx/readwrite/graphml.py", line 314, in <module>
    class GraphML(object):
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/networkx/readwrite/graphml.py", line 346, in GraphML
    (np.int, "int"), (np.int8, "int"),
  File "/Users/thesofakillers/miniconda3/envs/temp/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

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