Code Monkey home page Code Monkey logo

Comments (2)

matthewfeickert avatar matthewfeickert commented on June 19, 2024

Localizing this a bit:

  • Python 3.8
$ python -c 'from yadage.steering_api import run_workflow'  # no output as import works
  • Python 3.9
$ python -c 'from yadage.steering_api import run_workflow'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/yadage/steering_api.py", line 8, in <module>
    from .steering_object import YadageSteering
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/yadage/steering_object.py", line 5, in <module>
    import adage
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/adage/__init__.py", line 6, in <module>
    from adage.adageobject import adageobject
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/adage/adageobject.py", line 1, in <module>
    import adage.graph
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/adage/graph.py", line 1, in <module>
    import networkx as nx
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/networkx/__init__.py", line 84, in <module>
    import networkx.generators
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/networkx/generators/__init__.py", line 5, in <module>
    from networkx.generators.classic import *
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/networkx/generators/classic.py", line 21, in <module>
    from networkx.algorithms.bipartite.generators import complete_bipartite_graph
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/networkx/algorithms/__init__.py", line 12, in <module>
    from networkx.algorithms.dag import *
  File "/home/feickert/.pyenv/versions/recast-atlas-39/lib/python3.9/site-packages/networkx/algorithms/dag.py", line 2, in <module>
    from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/home/feickert/.pyenv/versions/3.9.6/lib/python3.9/fractions.py)

where

$ pip show networkx
Name: networkx
Version: 1.11
Summary: Python package for creating and manipulating graphs and networks
Home-page: http://networkx.github.io/
Author: NetworkX Developers
Author-email: [email protected]
License: BSD
Location: /home/feickert/.pyenv/versions/3.9.6/envs/recast-atlas-39/lib/python3.9/site-packages
Requires: decorator
Required-by: adage

As described in smicallef/spiderfoot#1124, this is due to networkx<2.5 using a deprecated function. So as adage is apparently pinning this with

    install_requires = [
        'networkx==1.11'
    ],

Luckily, yadage requires adage

$ pip show adage
Name: adage
Version: 0.10.1
Summary: running dynamic DAG workflows
Home-page: UNKNOWN
Author: Lukas Heinrich
Author-email: [email protected]
License: UNKNOWN
Location: /home/feickert/.pyenv/versions/3.9.6/envs/recast-atlas-39/lib/python3.9/site-packages
Requires: networkx
Required-by: yadage

but doesn't have it pinned.

So the minimum fix for this should be:

  1. Upgrade networkx dependency in adage to be networkx>=2.5
  2. Fix anything that breaks with that
  3. Make new release of adage

from recast-atlas.

matthewfeickert avatar matthewfeickert commented on June 19, 2024

Resolved with release of recast-atlas v0.1.9 given the release of adage v0.10.2.

from recast-atlas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.