python-networkx and python3-networkx conflict

Bug #1285611 reported by Gordon Ball
120
This bug affects 23 people
Affects Status Importance Assigned to Milestone
python-networkx (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Ubuntu: trusty 14.04

The python2 and python3 packages for the networkx library should (presumably) be co-installable, but currently contain a common set of files that cause whichever is installed second to fail.

python-networkx: 1.8.1-0ubuntu3
python3-networkx: 1.8.1-0ubuntu3

$ sudo apt-get install python{,3}-networkx
[ ... ]
dpkg: error processing archive /var/cache/apt/archives/python3-networkx_1.8.1-0ubuntu3_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/python-networkx/examples/basic/read_write.py', which is also in package python-networkx 1.8.1-0ubuntu3

While the library is installed in /usr/lib/pythonX.Y/dist-packages in each case, both attempt to install (I think identical) documentation/examples to /usr/share/doc/python-networkx, causing the collision.

I assume either a python 2/3 independent documentation package is needed, or the python3 package needs to change the directory into which it installs documentation. There seem to be a number of other python3- prefixed directories in /usr/share/doc, so this wouldn't be unprecedented.

This bug was not present in Saucy (python-networkx 1.7-2, python3-networkx 1.7-2), in which the python3 version contains no documentation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-networkx (Ubuntu):
status: New → Confirmed
Kick In (kick-d)
Changed in python-networkx (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Kick In (kick-d) wrote :

We are waiting for version 1.9 package to be included, meanwhile a workaround can be done:

do it in two phases:
install python-networkx (if not done already):
sudo apt-get install python-networkx
then you will need to move python-networkx doc:
sudo mv /usr/share/doc/python-networkx /usr/share/doc/python2.7-networkx
so the documentation for python-networkx will be available from /usr/share/doc/python2.7-networkx
don't forget to manually remove this directory if you remove/purge package

then:
sudo apt-get download python3-networkx
sudo dpkg -i --force-download python3-networkx

then the documentation for python3-networkx, will be splitted in two parts:
/usr/share/doc/python3-networkx and /usr/share/doc/python-networkx

Not very nice but it allows you to install both of them.
If you remove python-networkx, il will remove the python3-networkx, so you may want to copy documention if you want to keep python3-netwokrx documentation
sudo mv /usr/share/doc/python-networkx /usr/share/doc/python3-networkx
if you do so, don't forget to manually remove this directory when removing python3-networkx

Changed in python-networkx (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Pedro Guerreiro (pmguerre) wrote :

Will this be fixed in Ubuntu 16.04? Debian Jessie already has version 1.9, so, please fix this.

Revision history for this message
Matthias Klose (doko) wrote :

fixed in 1.10-1ubuntu2

Changed in python-networkx (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.