Score:0

python 2.7.15~rc1-1 is to be installed

se flag

I'm trying to run this line in my ubuntu 22.04 terminal to setup CUDA:

sudo apt-get install python3-dev python3-tk python-imaging-tk

but get this error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python-pil.imagetk' instead of 'python-imaging-tk'
python3-dev is already the newest version (3.10.6-1~22.04).
python3-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython2-stdlib : Breaks: libpython-stdlib (< 2.7.15-2) but 2.7.15~rc1-1 is to be installed
 python2 : Breaks: python (< 2.7.15-2) but 2.7.15~rc1-1 is to be installed
 python2-minimal : Breaks: python-minimal (< 2.7.15-2) but 2.7.15~rc1-1 is to be installed
 python3-six : Breaks: libpython-stdlib (< 2.7.18) but 2.7.15~rc1-1 is to be installed
               Breaks: python-minimal (< 2.7.18) but 2.7.15~rc1-1 is to be installed
 python3-yaml : Breaks: libpython-stdlib (< 2.7.18) but 2.7.15~rc1-1 is to be installed
                Breaks: python-minimal (< 2.7.18) but 2.7.15~rc1-1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I've searched and tried a lot of things but nothing works. Every time I check:

apt-cache policy python libpython2.7-minimal

the output is still:

python:
  Installed: (none)
  Candidate: 2.7.15~rc1-1
  Version table:
     2.7.15~rc1-1 500
        500 http://dk.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
libpython2.7-minimal:
  Installed: 2.7.18-13ubuntu1.1
  Candidate: 2.7.18-13ubuntu1.1
  Version table:
 *** 2.7.18-13ubuntu1.1 500
        500 http://tw.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.7.18-13ubuntu1 500
        500 http://tw.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
     2.7.15~rc1-1 500
        500 http://dk.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Does someone has any idea?

Pilot6 avatar
cn flag
Why do you have `bionic` sources in 22.04?
Eiffel洪曉虹 avatar
se flag
is that a problem? i'm quite new and didn't really know why that happens and what should I do now
Pilot6 avatar
cn flag
Yes, that is a problem.
Pilot6 avatar
cn flag
Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories)
us flag
The package `python-imaging-tk` does not exist in your version of Ubuntu. You might be following some outdated tutorials. Please ask a new question about what you are trying to do, and which all steps you followed.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.