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

network-metis on conda-forge is incompatible with networkx #74

Open
DOSull opened this issue Apr 14, 2021 · 2 comments
Open

network-metis on conda-forge is incompatible with networkx #74

DOSull opened this issue Apr 14, 2021 · 2 comments

Comments

@DOSull
Copy link

DOSull commented Apr 14, 2021

This might not be a problem with networkx-metis per se, but I've spent the last couple of hours figuring out what was up and think it is worth raising it as an issue.

If I make a simple conda environment to work in with

conda env create -n nxm -c conda-forge cython networkx networkx-metis

then do

import networkx as nx
import nxmetis
G = nx.complete_graph(10)
nxmetis(G, 2)

I get an error which reports

AttributeError: 'Graph' object has no attribute 'node'

which is line 230 in __init__.py and suggests that the conda recipe above is still installing a version that dates back to late 2019 and this commit. Perhaps the dependencies information in the channel is incorrect? Is that something that should be reported to conda, or do I report it here?

As I rely on conda to manage my python environments and get nervous any time I have to resort to pip installing into a conda environment, I wonder if this is an issue that can be fixed? Until that happens I can't easily use network-metis in my normal workflow with recent versions of other packages.

@MridulS
Copy link
Member

MridulS commented Apr 14, 2021

Unfortunately there hasn't been a new release after that fix, so there is no binary available at conda-forge to install it. It has to be pip installed if you want the latest packages.
I tested the following 2 configurations and they worked for me.

environment.yml file with the last working networkx release.

name: nxm
channels:
  - conda-forge
dependencies:
  - networkx=1.11
  - cython
  - networkx-metis

pip-install inside the conda env if you would like to get the latest release.

name: nxm
channels:
  - conda-forge
dependencies:
  - networkx
  - cython
  - pip
  - pip:
    - git+https://github.com/networkx/networkx-metis.git

@DOSull
Copy link
Author

DOSull commented Apr 14, 2021

OK thanks for looking into it. Seems like a new release might be worth doing by now!

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

No branches or pull requests

2 participants