简体   繁体   中英

Package 'python3-venv' has no installation candidate

I'm currently trying to install Flask for testing a simple web page. Unfortunately i got the following message:

Command 'virtualenv' not found, but can be installed with:
sudo apt install python3-virtualenv

When i do it, i got:

Unable to locate package python3-virtualenv

I check my python version and I'm on Python 3.10.4

Whent i try sudo apt-get update i got:

W: Some index files failed to download. They have been ignored, or old ones used instead.

Whent i try sudo apt-get upgrade i got:

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

And when i try sudo apt-get install python3-venv i got:

E: Package 'python3-venv' has no installation candidate

sudo apt install python3-virtualenv works perfectly fine with me. Alternatively you can install it using pip

pip3 install virtualenv

After completion you can check for which virtualenv to get the path of the location where it has been installed.

Had this problem after upgrading to Ubuntu 20.4 and all my problems stemmed from a very old version of Pip that was solved by this lovely command:

curl -sS https://bootstrap.pypa.io/get-pip.py | python3

More information and some alternatives here: pip3 install not working - No module named 'pip._vendor.pkg_resources'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM