Installing PyTorch under Python 3.8 - Question about networkx version

I’m trying to install PyTorch on Ubuntu 20.04 with pip under Python 3.8.

According to the official, PyTorch can work under Python 3.8, however, PyTorch requires networkx package and the latest version of it requires Python 3.9+.

So, before installing PyTorch, I have to install the older version of networkx manually by pip install networkx==3.1.
My question here is, is it OK to use this older networkx package with the latest PyTorch?

2 Likes

Yes, it should be OK since the CI uses a docker container with networkx==2.8.8 so even older.

1 Like

I understand. Thank you!

So why isn’t the Pytorch installer already selecting the correct version of networkx?

1 Like