Products and Features
- Membuka Akses Ping pada IP Public VM Cloud Raya
- Maximize Your Storage Raya Access Speed with Content Delivery Network (CDN)
- How to Create Project Tag in Cloud Raya for More Organized VM Billing Report
- Exporting Cloud Raya VM to outer Cloud Raya's Infrastructure using Acronis Cyber Protect
- SSO Management on Cloud Raya
- Easy Steps to Enable VPC in Cloud Raya
- Using the SSH key Feature in Cloud Raya Dashboard
- Cloud Raya Load Balancer, Solution to Distribute Load Equally
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- Fix Broken LetsEncrypt SSL Certificate due to Expired Root CA Certificate
- Storage Raya - Cloud Raya S3 Object Storage
- How to Make a Snapshot and Configure VM Backup in Cloud Raya
- How to Request Services or Licenses Products
- Adding, Attaching, and Resize Root Storage Disk in Cloud Raya VPS
- Managing your DNS Zone with DNS Bucket in Cloud Raya
- Create VM, Custom Package, Reinstall VM, and Adjusting Security Profile
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Backing-Up Cloud Raya Windows VM Using Acronis Cyber Protect
- Load Balancing in Cloud Raya
- Establishing a VPN in Cloud Raya
- Generating an API Token
- Generating an API key
- Deploying a Virtual Machine in Cloud Raya
- Show Remaining Articles ( 9 ) Collapse Articles
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Maximize Your Storage Raya Access Speed with Content Delivery Network (CDN)
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Storage Raya - Cloud Raya S3 Object Storage
- Exporting Cloud Raya VM to outer Cloud Raya's Infrastructure using Acronis Cyber Protect
- Using the SSH key Feature in Cloud Raya Dashboard
- Adding, Attaching, and Resize Root Storage Disk in Cloud Raya VPS
- Create VM, Custom Package, Reinstall VM, and Adjusting Security Profile
- How to backup Linux VM via Acronis in Cloud Raya
- Backing-Up Cloud Raya Windows VM Using Acronis Cyber Protect
- Deploying a Virtual Machine in Cloud Raya
Integration
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Replatforming Apps to K8s with RKE and GitLab CI
- Integrasi API OpenAI: Completions dalam PHP
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Meningkatkan Pengiriman Email dengan Sendinblue SMTP Relay
- Bangun Self Hosted Password Manager menggunakan Passbolt
- How to Install Podman on Almalinux/Rocky Linux 9
- ElkarBackup: GUI Based backup Tools based on Rsync and Rsnapshot
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Otomatisasi Task dengan Cronjob
- Upgrade Zimbra and the OS Version
- Deploy Mailu on Rancher Kubernetes
- Export dan Import Database di MySQL atau MariaDB Menggunakan Mysqldump
- Backup & Sync Local and Remote Directories Using RSYNC
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Simple monitoring and alerting with Monit on Ubuntu 22.04 LTS
- VS Code on your browser! How to install code-server on a VM
- Implementing Redis HA and Auto-Failover on Cloud Raya
- Using XFCE Desktop Environment on Cloud Raya VM
- Installing Python 3.7-3.9 on Ubuntu 22.04 Jammy LTS using PPA
- Implementing Continuous Integration with Gitlab CI and Continuous Delivery with Rancher Fleet
- Using Collabora Online on Cloud Raya NextCloud's VM
- Installing NextCloud in Cloud Raya- Detail Steps from the Beginning to the Very End
- Set Up High Availability PostgreSQL Cluster Using Patroni on Cloud Raya
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Using the SSH key Feature in Cloud Raya Dashboard
- Monitor Your Services Uptime Using Uptime Kuma
- Hosting Static Website with Hugo on Cloud Raya
- Kubernetes Ingress Controller using SSL in CloudRaya
- Reverse Proxy management using Nginx Proxy Manager
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- How to deploy Portainer on Linux to easily manage your docker containers
- High Availability Kubernetes Using RKE in Cloud Raya Part 3
- High Availability Kubernetes Using RKE in Cloud Raya Part 2
- High Availability Kubernetes Using RKE in Cloud Raya Part 1
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Deploying Magento on Cloud Raya
- How to Install Nextcloud on Cloud Raya
- How to Install CWP in Cloud Raya
- How to Install Node.js and Launch Your First Node App
- How to install and secure MariaDB on Ubuntu 18.04 and 20.04 on Cloud Raya
- How to Install and Securing MongoDB on Ubuntu 18.04 and 20.04
- Classes: Post Installation on Ansible
- Classes: Install and Configure Ansible
- Classes: Introduction to Ansible for a robust Configuration Management
- How to Setup Active Directory Domain Service & DNS with Cloud Raya
- How to Host Your Own Docker Hub in Cloud Raya
- How to Setup Your Own Laravel with Nginx in Ubuntu 18.04
- How to Deploy Container in Cloud Raya using Docker
- Securing CentOS with iptables
- Install and Configure Squid Proxy in Ubuntu
- Installing Apache and Tomcat: A Quick Way
- Securing Ubuntu with UFW
- Install a Node.js and Launch a Node App on Ubuntu 18.04
- Installing LAMP in Ubuntu
- Installing LEMP Stack on Ubuntu 18.04
- Show Remaining Articles ( 50 ) Collapse Articles
- Articles coming soon
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Meningkatkan Pengiriman Email dengan Sendinblue SMTP Relay
- Bangun Self Hosted Password Manager menggunakan Passbolt
- ElkarBackup: GUI Based backup Tools based on Rsync and Rsnapshot
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Upgrade Zimbra and the OS Version
- Deploy Mailu on Rancher Kubernetes
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Simple monitoring and alerting with Monit on Ubuntu 22.04 LTS
- VS Code on your browser! How to install code-server on a VM
- Implementing Redis HA and Auto-Failover on Cloud Raya
- Using XFCE Desktop Environment on Cloud Raya VM
- Implementing Continuous Integration with Gitlab CI and Continuous Delivery with Rancher Fleet
- Using Collabora Online on Cloud Raya NextCloud's VM
- Installing NextCloud in Cloud Raya- Detail Steps from the Beginning to the Very End
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Monitor Your Services Uptime Using Uptime Kuma
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- How to deploy Portainer on Linux to easily manage your docker containers
- High Availability Kubernetes Using RKE in Cloud Raya Part 3
- High Availability Kubernetes Using RKE in Cloud Raya Part 2
- High Availability Kubernetes Using RKE in Cloud Raya Part 1
- How to Install Nextcloud on Cloud Raya
- Classes: Post Installation on Ansible
- Classes: Install and Configure Ansible
- Classes: Introduction to Ansible for a robust Configuration Management
- Connect Windows Active Directory on Cloud Raya with Azure AD
- How to Host Your Own Docker Hub in Cloud Raya
- How to Deploy Container in Cloud Raya using Docker
- Show Remaining Articles ( 22 ) Collapse Articles
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Integrasi API OpenAI: Completions dalam PHP
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Otomatisasi Task dengan Cronjob
- How to Deploy Django App on Cloud Raya VM Using Gunicorn, Supervisor, and Nginx
- How to Install Node.js and Launch Your First Node App
- How to Setup Your Own Laravel with Nginx in Ubuntu 18.04
- Install a Node.js and Launch a Node App on Ubuntu 18.04
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Bangun Self Hosted Password Manager menggunakan Passbolt
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Export dan Import Database di MySQL atau MariaDB Menggunakan Mysqldump
- Backup & Sync Local and Remote Directories Using RSYNC
- How to Deploy Django App on Cloud Raya VM Using Gunicorn, Supervisor, and Nginx
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Using the SSH key Feature in Cloud Raya Dashboard
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Securing CentOS with iptables
- Securing Ubuntu with UFW
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Bangun Self Hosted Password Manager menggunakan Passbolt
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Installing Python 3.7-3.9 on Ubuntu 22.04 Jammy LTS using PPA
- Reverse Proxy management using Nginx Proxy Manager
- Install and Configure Squid Proxy in Ubuntu
- Installing Apache and Tomcat: A Quick Way
- Installing LAMP in Ubuntu
- Installing LEMP Stack on Ubuntu 18.04
- Show Remaining Articles ( 1 ) Collapse Articles
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Integrasi API OpenAI: Completions dalam PHP
- Hosting Static Website with Hugo on Cloud Raya
- Deploying Magento on Cloud Raya
- How to Install CWP in Cloud Raya
- How to Setup Active Directory Domain Service & DNS with Cloud Raya
Installing Python 3.7-3.9 on Ubuntu 22.04 Jammy LTS using PPA
Canonical recently announces the general availability of Ubuntu 22.04 Jammy Jellyfish LTS on April 21, 2022. Jammy has Python 3.10 installed already. Indeed, you can install more versions via the upstream repository but it only provides Python 2.7 and Python 3.10 modules. In this article, I will show you how to install Python 3.7 up to 3.9
TLDR
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.8
Installing Python
First of all, you’ll need the following package installed so we can import any PPA (Personal Package Archive) repositories:
sudo apt install software-properties-common -y
Then, we will import deadsnake’s PPA:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
You can then install previous Python versions, for example Python 3.7:
sudo apt install python3.7
The maintainer of the PPA informs that they only ship Python 3.7 as the lowest version for Jammy, so if you wish to install the more older version, you might want to install it for source.
Supported Ubuntu and Python Versions
====================================
- Ubuntu 18.04 (bionic) Python2.3 - Python 2.6, Python 3.1 - Python 3.5, Python3.7 - Python3.11
- Ubuntu 20.04 (focal) Python3.5 - Python3.7, Python3.9 - Python3.11
- Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11
- Note: Python2.7 (all), Python 3.6 (bionic), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages.
Install PIP
The previous python installation does not provide pip
by default, so you will have to do:
python3.x -m ensurepip --upgrade
Then verify it using
pip --version
Important Thing to Note
Never ever change the default python version of Ubuntu as it will break many things. Either by changing python3
symlink or using update-alternatives
command.
Conclusion
To sum up the article, it is easy to install previous versions of Python on Ubuntu 22.04 Jammy LTS thanks to deadsnake team’s PPA. Hopefully you find this tutorial article helpful for your present and up coming project.
For more articles and tutorials about technology, please visit Cloud Raya’s Knowledge Base and Blog. Even better, you can video stream tutorials from Cloud Raya’s Youtube channel.
2 Comments
Hi, i see this error
sudo add-apt-repository ppa:deadsnakes/ppa -y
Traceback (most recent call last):
File “/usr/bin/add-apt-repository”, line 364, in <module>
sys.exit(0 if addaptrepo.main() else 1)
File “/usr/bin/add-apt-repository”, line 347, in main
shortcut = handler(source, **shortcut_params)
File “/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py”, line 40, in shortcut_handler
return handler(shortcut, **kwargs)
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 82, in __init__
if self.lpppa.publish_debug_symbols:
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 120, in lpppa
self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 107, in lpteam
self._lpteam = self.lp.people(self.teamname)
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 98, in lp
self._lp = login_func(“%s.%s” % (self.__module__, self.__class__.__name__),
File “/usr/lib/python3/dist-packages/launchpadlib/launchpad.py”, line 494, in login_anonymously
return cls(
File “/usr/lib/python3/dist-packages/launchpadlib/launchpad.py”, line 230, in __init__
super(Launchpad, self).__init__(
File “/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py”, line 472, in __init__
self._wadl = self._browser.get_wadl_application(self._root_uri)
File “/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py”, line 447, in get_wadl_application
response, content = self._request(url, media_type=wadl_type)
File “/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py”, line 389, in _request
response, content = self._request_and_retry(
File “/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py”, line 359, in _request_and_retry
response, content = self._connection.request(
File “/usr/lib/python3/dist-packages/httplib2/__init__.py”, line 1725, in request
(response, content) = self._request(
File “/usr/lib/python3/dist-packages/launchpadlib/launchpad.py”, line 144, in _request
response, content = super(LaunchpadOAuthAwareHttp, self)._request(
File “/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py”, line 184, in _request
return super(RestfulHttp, self)._request(
File “/usr/lib/python3/dist-packages/httplib2/__init__.py”, line 1441, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File “/usr/lib/python3/dist-packages/httplib2/__init__.py”, line 1363, in _conn_request
conn.connect()
File “/usr/lib/python3/dist-packages/httplib2/__init__.py”, line 1153, in connect
sock.connect((self.host, self.port))
File “/usr/lib/python3/dist-packages/httplib2/socks.py”, line 504, in connect
self.__negotiatehttp(destpair[0], destpair[1])
File “/usr/lib/python3/dist-packages/httplib2/socks.py”, line 465, in __negotiatehttp
raise HTTPError((statuscode, statusline[2]))
httplib2.socks.HTTPError: (403, b’Forbidden’)
any ideas?
Hi Emanuel,
Thanks for your question.
It’s possible that your network is proxied thus it returns the 403 Forbidden error.
If you can access the PPA page (https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) then you should have no issue importing the repo.
Let me know if you’re still having issues.
Thanks!