PDA

View Full Version : [ubuntu] Failed to upgrade 3 packages in 18.04 LTS



terrylshg
May 6th, 2018, 02:15 AM
Since upgrading to the Ubuntu 18.04 LTS, there are three packages cannot be updated to the latest version:



Package Version Latest Type--------- ------- ------ -----
pycairo 1.16.2 1.17.0 sdist
pygobject 3.26.1 3.28.2 sdist
pyxdg 0.25 0.26 wheel


If I try to use the PIP INSTALL --UPGRADE command to upgrade the above three packages, here are the error messages:



Cannot uninstall 'pycairo'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Cannot uninstall 'pygobject'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Cannot uninstall 'pyxdg'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.



Any idea how to upgrade the above three packages properly? Thanks in advance.

Frogs Hair
May 6th, 2018, 02:30 AM
Hello and Welcome

The link may be related.
https://github.com/pypa/pip/issues/5247

terrylshg
May 6th, 2018, 09:34 AM
Thanks for the response. It seems that this command can help to upgrade the package without checking the installed package:

sudo -H pip install pycairo --upgrade --ignore-installed pycairo

Now, all the three packages had been updated successfully.