Reputation: 20865
I try to get a script running, which needs python3 and networkx
python3-networkx is not in the apt-repository, so I installed it using:
apt-get install python-networkx
But still my script crashed saying networkx is not found.
How can I install the python3 version?
Upvotes: 1
Views: 1151
Reputation: 1962
For installing packges in Debian, you may run:
sudo apt-get update
sudo apt-cache search networkx
Which shows this:
python-networkx - tool to create, manipulate and study complex networks
python-networkx-doc - tool to create, manipulate and study complex networks - documentation
python3-networkx - tool to create, manipulate and study complex networks (Python3)
Then you can run:
sudo apt-get install python-networkx
Alternatively, you can use pip:
sudo apt-get update
sudo apt-get install python-pip
sudo pip install networkx
I have tried this in jessie and it worked with python 2.7.
For installing python3 you can use:
sudo apt-get update
sudo apt-get install python3 python3-pip
and for installing networkx:
In Debian jessie:
sudo pip3 install networkx
In Debian Wheezy:
sudo pip-3.2 networkx
You can check more info about apt-get here or man apt-get
in linux terminal.
Also you can check pip documentation here.
Upvotes: 4