-2
(pytorch_py38) root@4cc939e968fe ~/w/p/o/bulid# sudo apt-get upgrade                                                                                                          100
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libpython3.6 : Depends: libpython3.6-stdlib (= 3.6.13-1+xenial2) but 3.6.9-1~18.04ubuntu1.3 is installed
 libpython3.6-dev : Depends: libpython3.6-stdlib (= 3.6.13-1+xenial2) but 3.6.9-1~18.04ubuntu1.3 is installed
 libpython3.6-stdlib : Depends: libpython3.6-minimal (= 3.6.9-1~18.04ubuntu1.3) but 3.6.13-1+xenial2 is installed
 python3.6 : Depends: libpython3.6-stdlib (= 3.6.13-1+xenial2) but 3.6.9-1~18.04ubuntu1.3 is installed
MisterMiyagi
  • 44,374
  • 10
  • 104
  • 119

1 Answers1

0

I hope it is not too late now that I am writing this solution :) If you want to install other versions of Python 3 than which is not packaged in your distribution (for example, if you are using Ubuntu 20.10 and you need to Install Python 3.7 and manage it using apt or apt-get , just do the following instructions:

  1. Add ppa:deadsnakes/ppa to your apt:

     $ sudo apt-get update
    
     $ sudo apt-get install software-properties-common
    
     $ sudo add-apt-repository ppa:deadsnakes/ppa
    
     $ sudo apt-get update
    
  2. In /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-($yourdistroname).list file, change the name of your distro to nearest LTS version for example if you use groovy(Ubuntu 20.10) the nearest LTS version is focal(Ubuntu 20.04).

     $   ///../---($).
    
  3. Download one of these deb package according to the type of system architecture and install it:

    amd --> https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb

    i386 --> https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_i386.deb

     $   - {}/{}/_.-_.
    
     $   
    
  4. Now you can install any version of Python you need :

     $ sudo apt install python3.x
    
Javad
  • 2,033
  • 3
  • 13
  • 23