16

I'm trying to install Pyenv, and I'm running on Ubuntu 22.04 LTS. but whenever I run this command

sudo apt install -y make build-essential libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl \ git

I get this error

Unable to locate package python-openssl

I've tried searching for solutions online, but I think they have encountered it on older versions of Ubuntu and not on the latest version.

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Jaygee
  • 173
  • 1
  • 8
  • Please do not add answers to the question body itself. See [what should I do when someone answers](https://stackoverflow.com/help/someone-answers) on how to show you've solved your problem. – Adriaan Nov 25 '22 at 10:40

4 Answers4

23

Make sure your list of packages is updated (sudo apt update). Python openssl bindings are available in 22.04 in python3-openssl (link), so you can install it by running

sudo apt install python3-openssl
m7a
  • 346
  • 1
  • 4
2

you must be using python3 so change python-openssl to python3-openssl in command

1
sudo apt install openssl libssl-dev
chriscanna
  • 106
  • 1
  • 3
0

Had the same issue, changing from python to python3, as suggested here, worked for me.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34437237) – Bastien May 25 '23 at 19:25