1

I installed biopython and python 3.5 and set it as default with

sudo apt-get install idle3
sudo apt-get install python3-numpy
sudo apt-get install python3-scipy
sudo apt-get install python3-biopython
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2

everything worked good but now -- all of a sudden after having installed other stuff successfully I'm getting a failure when installing font-manager:

$ sudo apt-get install -f 
[sudo] password...: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-biopython (1.66+dfsg-1build1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-biopython (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-libxml2 (2.9.3+dfsg1-1ubuntu0.1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-libxml2 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 python-biopython
 python-libxml2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now, I know that the Sub-process /usr/bin/dpkg returned an error code (1) has been posted several times, but each time the answer is specific to the broken package.

I tried to remove python-biopython and libxml2 but I can't install or remove anything now due to this broken package. Neither Synaptic could solve the problem.

I would rather skip the reinstalling the whole operative system, so is there a solution that I can apply?

Many thanks.

0

I think you need to change the default version if your python default version to python2. do:

ls /usr/bin/python*

check your current default python by:

python --version

Then to check the list of python version

 update-alternatives --list python

Then do:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

Then do:

 update-alternatives --list python

Then do:

sudo update-alternatives --config python

Then select the python version 2 and then do:

sudo apt-get install -f 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.