Note that there was a version problem with networkx

Note that there was a version problem with networkx

-Network has modules that depend on the environment, and depending on the version, the function cannot be found and an error is thrown, so I decided to write a solution.

environment

python 3.7.7

anaconda 4.8.3

os1 windows10

os2 ubuntu 18.04

networkx 2.4

# The function in question

nx.connected_component_subgraphs(G)

nx.draw(SG)

I got an error with these two functions this time. # Solution From the command prompt or terminal
pip install networkx==2.3

I was able to avoid the error by executing and lowering the version.

Since I was able to confirm the operation on both ubuntu and window, it is considered to be a problem on the networkx side.

Consideration

Since the stable version of networkx was released about half a year ago, if there is a big problem, it is thought that the stable version is returned to 2.3, so I thought there was an alternative function, but I couldn't find it.

Recommended Posts

Note that there was a version problem with networkx
Error with pip: There was a problem confirming the ssl certificate
Note that one problem was solved when jupyter-notebook was introduced.
Draw a graph with NetworkX
Draw a graph with networkx
Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
A note I was addicted to when creating a table with SQLAlchemy
A note that prints numpy.array nicely
The LXC Web Panel that can operate LXC with a browser was wonderful
I was addicted to trying Cython with PyCharm, so make a note
[Python] A program that creates stairs with #
Create a virtual environment with Python_Mac version
[AtCoder] Solve ABC1 ~ 100 A problem with Python
A note on enabling PostgreSQL with Django
Create a Connecting Nearest Neighbor with NetworkX
A typed world that begins with Python
A note I was addicted to when running Python with Visual Studio Code
A story that I was addicted to when I made SFTP communication with python
Note that the calculation of average pairwise correlation was very easy with pandas
A model that identifies the guitar with fast.ai
[AtCoder] Solve A problem of ABC101 ~ 169 with Python
A memo that made a graph animated with plotly
Create a page that loads infinitely with python
[Note] Create a one-line timezone class with python
A note about the python version of python virtualenv
A note about checking modifiers with Max Plus
Challenge AtCoder (ABC) 164 with Python! A ~ C problem
Try creating a FizzBuzz problem with a shell program
It was a little difficult to do flask with the docker version of nginx-unit
Solved the problem that the image was not displayed in ROMol when loaded with PandasTools.LoadSDF.
[AWS] Development environment version that tried to build a Python environment with eb [Elastic Beanstalk]