Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networkx is out of date #4

Open
walchko opened this issue Nov 18, 2019 · 5 comments
Open

networkx is out of date #4

walchko opened this issue Nov 18, 2019 · 5 comments

Comments

@walchko
Copy link

walchko commented Nov 18, 2019

Can you update to the current library?

ERROR: urdfpy 0.0.18 has requirement networkx==2.2, but you'll have networkx 2.4 which is incompatible.
@sdahdah
Copy link

sdahdah commented Jan 21, 2022

I am also having issues with NetworkX 2.2 on Python 3.9 and Python 3.10. I force-updated to NetworkX 2.6.3 and it's working fine so far

@yorickdewid
Copy link

Not sure it this is related, but networkx throws an error: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

@ZdenekM
Copy link

ZdenekM commented Mar 24, 2023

@yorickdewid These are my workarounds for Python 3.10.

import collections
import fractions
import math

fractions.gcd = math.gcd  # type: ignore

from collections.abc import Iterable, Mapping, Set  # noqa:E402

collections.Mapping = Mapping  # type: ignore
collections.Set = Set  # type: ignore
collections.Iterable = Iterable  # type: ignore

from urdfpy import URDF  # noqa

@littlebee
Copy link

@yorickdewid These are my workarounds for Python 3.10.

import collections
import fractions
import math

fractions.gcd = math.gcd  # type: ignore

from collections.abc import Iterable, Mapping, Set  # noqa:E402

collections.Mapping = Mapping  # type: ignore
collections.Set = Set  # type: ignore
collections.Iterable = Iterable  # type: ignore

from urdfpy import URDF  # noqa

Tried the above changes and progressed to new error:

Traceback (most recent call last):
  File "/Users/bee/projects/strongarm/src/commons/urdf_utils.py", line 19, in <module>
    from urdfpy import URDF, Link, Joint, Mesh  # noqa:E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/urdfpy/__init__.py", line 1, in <module>
    from .urdf import (URDFType,
    ...<5 lines>...
                       Transmission, Joint, Link, URDF)
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/urdfpy/urdf.py", line 7, in <module>
    import networkx as nx
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/networkx/__init__.py", line 117, in <module>
    import networkx.readwrite
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/networkx/readwrite/__init__.py", line 15, in <module>
    from networkx.readwrite.graphml import *
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/networkx/readwrite/graphml.py", line 314, in <module>
    class GraphML(object):
    ...<52 lines>...
        }
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/networkx/readwrite/graphml.py", line 345, in GraphML
    (np.float16, "float"), (np.float_, "float"),
                            ^^^^^^^^^
  File "/opt/anaconda3/envs/strongarm/lib/python3.13/site-packages/numpy/__init__.py", line 400, in __getattr__
    raise AttributeError(
    ...<3 lines>...
    )
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.

@traversaro
Copy link

See also #31 for a mantained version of urdfpy available on both PyPI and conda-forge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants