Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Messed up Python installation

  1. #11
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Quote Originally Posted by 1fallen View Post
    This has worked for me:
    Code:
    sudo mv /var/lib/dpkg/info/<packagename>.* /tmp/
    sudo dpkg --remove --force-remove-reinstreq <packagename>
    sudo apt remove <packagename>
    sudo apt autoremove && sudo apt autoclean
    And if that still leaves you in the same state try:
    Code:
    sudo apt install --reinstall python-debian python3-debian python-chardet python3-chardet
    Good Luck
    Still:

    Code:
    19:06:36 ~$ sudo apt install -f
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    3 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Setting up python-debian (0.1.21+nmu2ubuntu2) ...
      File "/usr/bin/pycompile", line 69
        with file(join(name, fn), 'r') as lines:
                ^
    SyntaxError: invalid syntax
    dpkg: error processing package python-debian (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of update-notifier-common:
     update-notifier-common depends on python-debian; however:
      Package python-debian is not configured yet.
    
    
    dpkg: error processing package update-notifier-common (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of update-notifier:
     update-notifier depends on update-notifier-common (= 0.154.1ubuntu6); however:
      Package update-notifier-common is not configured yet.
     update-notifier depends on python-debian; however:
      Package python-debian is not configured yet.
    
    
    dpkg: error processing package update-notifier (--configure):
     dependency problems - leaving unconfigured
    No apport report written because the error message indicates its a followup error from a previous failure.
          No apport report written because the error message indicates its a followup error from a previous failure.
                Errors were encountered while processing:
     python-debian
     update-notifier-common
     update-notifier
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    19:07:06 ~$

  2. #12
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Messed up Python installation

    This baby has really dug-in hasn't it.
    Can you us show us this:
    Code:
    dpkg -S /usr/lib/python2.7/optparse.py
    dpkg -V libpython2.7-minimal
    readlink -f /usr/lib/python2.7/optparse.py
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  3. #13
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Quote Originally Posted by 1fallen View Post
    This baby has really dug-in hasn't it.
    Can you us show us this:
    Code:
    dpkg -S /usr/lib/python2.7/optparse.py
    dpkg -V libpython2.7-minimal
    readlink -f /usr/lib/python2.7/optparse.py

    Code:
    19:17:02 ~$ dpkg -S /usr/lib/python2.7/optparse.py
    libpython2.7-minimal:amd64: /usr/lib/python2.7/optparse.py
    19:18:10 ~$ dpkg -V libpython2.7-minimal
    19:18:22 ~$ readlink -f /usr/lib/python2.7/optparse.py
    /usr/lib/python2.7/optparse.py
    19:18:31 ~$

  4. #14
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Messed up Python installation

    Was there any return for: "dpkg -V libpython2.7-minimal"?
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  5. #15
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Quote Originally Posted by 1fallen View Post
    Was there any return for: "dpkg -V libpython2.7-minimal"?
    None

  6. #16
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Just is case

    Code:
    19:32:53 ~$ ls /usr/bin | grep python
    depythontex
    depythontex3
    dh_python2
    dh_python3
    python
    python2
    python2.4
    python2.7-config
    python2-config
    python3
    python3.4
    python3.4-config
    python3.4m
    python3.4m-config
    python3-config
    python3m
    python3m-config
    python-config
    pythontex
    pythontex3
    x86_64-linux-gnu-python2.7-config
    x86_64-linux-gnu-python3.4-config
    x86_64-linux-gnu-python3.4m-config
    x86_64-linux-gnu-python3-config
    x86_64-linux-gnu-python3m-config
    x86_64-linux-gnu-python-config

  7. #17
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Messed up Python installation

    Well I like a challenge but this one might be a humbler for me, just to be sure will you show this please:
    Code:
    ls -l /usr/lib/python2.7/optparse.py
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  8. #18
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Quote Originally Posted by 1fallen View Post
    Well I like a challenge but this one might be a humbler for me, just to be sure will you show this please:
    Code:
    ls -l /usr/lib/python2.7/optparse.py
    Code:
    19:32:56 ~$ ls -la /usr/lib/python2.7/optparse.py
    -rw-r--r-- 1 root root 61205 Nov 13 16:57 /usr/lib/python2.7/optparse.py
    19:38:10 ~$

  9. #19
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Messed up Python installation

    I'm torn here, but try this and post back any errors:
    Code:
    sudo apt install --reinstall python3-minimal python-lockfile
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  10. #20
    Join Date
    Jan 2013
    Beans
    24

    Re: Messed up Python installation

    Quote Originally Posted by 1fallen View Post
    I'm torn here, but try this and post back any errors:
    Code:
    sudo apt install --reinstall python3-minimal python-lockfile

    Code:
    19:57:07 ~$ sudo apt install --reinstall python3-minimal python-lockfile
    [sudo] password for sergey: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      python-lockfile
    0 upgraded, 1 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
    4 not fully installed or removed.
    Need to get 31.3 kB of archives.
    After this operation, 58.4 kB of additional disk space will be used.
    Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main python3-minimal amd64 3.4.0-0ubuntu2 [23.2 kB]
    Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main python-lockfile all 1:0.8-2ubuntu2 [8,090 B]
    Fetched 31.3 kB in 0s (57.4 kB/s)          
    (Reading database ... 449036 files and directories currently installed.)
    Preparing to unpack .../python3-minimal_3.4.0-0ubuntu2_amd64.deb ...
    Unpacking python3-minimal (3.4.0-0ubuntu2) over (3.4.0-0ubuntu2) ...
    Selecting previously unselected package python-lockfile.
    Preparing to unpack .../python-lockfile_1%3a0.8-2ubuntu2_all.deb ...
    Unpacking python-lockfile (1:0.8-2ubuntu2) ...
    Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
    Setting up python-debian (0.1.21+nmu2ubuntu2) ...
      File "/usr/bin/pycompile", line 69
        with file(join(name, fn), 'r') as lines:
                ^
    SyntaxError: invalid syntax
    dpkg: error processing package python-debian (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of update-notifier-common:
     update-notifier-common depends on python-debian; however:
      Package python-debian is not configured yet.
    
    
    dpkg: error processing package update-notifier-common (--configure):
     dependency problems - leaving unconfigured
    Setting up python-pip (1.5.4-1ubuntu4) ...
    No apport report written because the error message indicates its a followup error from a previous failure.
            File "/usr/bin/pycompile", line 69
        with file(join(name, fn), 'r') as lines:
                ^
    SyntaxError: invalid syntax
    dpkg: error processing package python-pip (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of update-notifier:
     update-notifier depends on update-notifier-common (= 0.154.1ubuntu6); however:
      Package update-notifier-common is not configured yet.
     update-notifier depends on python-debian; however:
      Package python-debian is not configured yet.
    
    
    dpkg: error processing package update-notifier (--configure):
     dependency problems - leaving unconfigured
    Setting up python3-minimal (3.4.0-0ubuntu2) ...
    No apport report written because MaxReports is reached already
                                                                  Setting up python-lockfile (1:0.8-2ubuntu2) ...
      File "/usr/bin/pycompile", line 69
        with file(join(name, fn), 'r') as lines:
                ^
    SyntaxError: invalid syntax
    dpkg: error processing package python-lockfile (--configure):
     subprocess installed post-installation script returned error exit status 1
    No apport report written because MaxReports is reached already
                                                                  Errors were encountered while processing:
     python-debian
     update-notifier-common
     python-pip
     update-notifier
     python-lockfile
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    19:57:20 ~$

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •