Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7168

Can't install python3-venv in Ubuntu 20.04, some broken packages

$
0
0

This might be long but please bear with me till the end

When I tried to install python3-venv while following this article

sudo apt install build-essential libssl-dev libffi-dev python3-dev

It threw the following error:

libffi-dev python3-devReading package lists... DoneBuilding dependency tree       Reading state information... Donelibffi-dev is already the newest version (3.3-4).build-essential is already the newest version (12.8ubuntu1.1).libssl-dev is already the newest version (1.1.1f-1ubuntu2.16).Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: python3-dev : Depends: libpython3-dev (= 3.8.2-0ubuntu2) but it is not going to be installed               Depends: python3.8-dev (>= 3.8.2-1~) but it is not going to be installedE: Unable to correct problems, you have held broken packages.

So instead of python3-dev, I tried python3 only and it ran.


After that, I ran this command:

sudo apt install -y python3-venv

Then it gave me this:

Reading package lists... DoneBuilding dependency tree       Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: python3-venv : Depends: python3.8-venv (>= 3.8.2-1~) but it is not going to be installedE: Unable to correct problems, you have held broken packages.

So I thought maybe I need to install python3.8-venv, so I did:

sudo apt install -y python3.8-venv

AND, it gave me this error:

Reading package lists... DoneBuilding dependency tree       Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: python3.8-venv : Depends: python3.8 (= 3.8.10-0ubuntu1~20.04.5) but 3.8.13-1+bionic2 is to be installedE: Unable to correct problems, you have held broken packages.

THEN, I tried:

sudo apt install -y python3.8

which was fine and gave me this

Reading package lists... DoneBuilding dependency tree       Reading state information... Donepython3.8 is already the newest version (3.8.13-1+bionic2).0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

I don't know what to do, my virtual env isn't working, I read somewhere that it's pre-installed so I also tried directly creating a virtual env with

python3 -m venv myEnv

Which again gave me this:

Error: Command '['/home/yash/Desktop/DashMed/myEnv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

which upon googling said to install python3-venv which I've already failed in

SO I AM STUCK IN THIS LOOP

PLEASE HELP


Viewing all articles
Browse latest Browse all 7168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>