0

I'm currently using python2 (2.7.6) and python3 (3.6.3) on my ubuntu 14.04 and I want to install python-tk and python3-tk together (so I can use matplotlib for both python). However, whenever I install one of them, it will remove the other one.

For example, when I have python3-tk, and install python-tk from apt-get, it will do this:

The following packages will be REMOVED:
  blt python3-tk

After some try, I think the problem is in the blt package. Is there any what to install both python-tk and python3-tk on my computer?

Update, here is the output after I check the version of the packages (Currently I installed python3-tk(3.4.3) and blt(2.4) but it only works with python3.4, whenever I try to install python3-tk(3.6.3) and blt(2.5.3) it will cause the problem):

python-tk:
  Installed: 2.7.5-1ubuntu1
  Candidate: 2.7.5-1ubuntu1
  Version table:
 *** 2.7.5-1ubuntu1 0
        500 http://ubuntuarchive.mirror.nac.net/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
python3-tk:
  Installed: 3.4.3-1~14.04.2
  Candidate: 3.6.3-0ubuntu1~14.04.york0
  Version table:
     3.6.3-0ubuntu1~14.04.york0 0
        500 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/ trusty/main amd64 Packages
 *** 3.4.3-1~14.04.2 0
        500 http://ubuntuarchive.mirror.nac.net/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.4.0-0ubuntu1 0
        500 http://ubuntuarchive.mirror.nac.net/ trusty/main amd64 Packages
blt:
  Installed: 2.4z-7ubuntu2
  Candidate: 2.5.3+dfsg-3~14.04.york1
  Version table:
     2.5.3+dfsg-3~14.04.york1 0
        500 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/ trusty/main amd64 Packages
 *** 2.4z-7ubuntu2 0
        500 http://ubuntuarchive.mirror.nac.net/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
2
  • Where you got blt package? I do not have problems with sudo apt-get install python-tk python3-tk blt on clean 14.04 LTS installation. Please add output of apt-cache policy python-tk python3-tk blt to the question.
    – N0rbert
    Mar 26, 2018 at 9:20
  • Thanks for the response. I updated the question. I got all python3.6 related package from jonathonf ppa. Currently I installed python3-tk(3.4.3) and blt(2.4) but it only works with python3.4, whenever I try to install python3-tk(3.6.3) and blt(2.5.3) it will cause the problem.
    – miketonson
    Mar 26, 2018 at 12:47

1 Answer 1

1

It seems that ppa:jonathonf/python-3.6 caused problems on your system.

Two options here:

  • keep it and install packages from repository with sudo apt-get install python3-tk=3.4.3-1~14.04.2 blt=2.4z-7ubuntu2;
  • remove it with sudo ppa-purge ppa:jonathonf/python-3.6 and then install all updates with sudo apt-get dist-upgrade and your packages with sudo apt-get install python-tk python3-tk blt.
2
  • These are the versions I current installed in my ubuntu. However, python3-tk=3.4.3-1~14.04.2 blt=2.4z-7ubuntu2 only works with python3.4 but not python3.6. I still can't figure out a way to solve this for python3.6.
    – miketonson
    Mar 26, 2018 at 13:58
  • To make your system more usable I recommend to remove python-3.6 PPA. Then you can try to get python3.6 with Anaconda or maybe virtual python environment (I do not familiar with it).
    – N0rbert
    Mar 26, 2018 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .