xxxxxxxxxx
# download it from here
https://www.python.org/downloads/release/python-379/
xxxxxxxxxx
# for docker
apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt install python3.8
xxxxxxxxxx
# https://www.python.org/downloads/release/python-370/
# change the last 3 digits in the link to determine version
# (e.g: '370' -> 3.7.0 && if you want 3.7.5 version just change them to '375')
xxxxxxxxxx
import requests
# URL of the Python 3.8 download page
download_url = "https://www.python.org/downloads/release/python-380/"
# Send a request to the download page
response = requests.get(download_url)
# Get the direct download link for Python 3.8
start_index = response.text.find('"/ftp/python/3.8.')
end_index = response.text.find('.tar.xz', start_index)
direct_download_link = response.text[start_index+1:end_index+7]
# Download Python 3.8 installer
print("Downloading Python 3.8 installer...")
response = requests.get("https://www.python.org" + direct_download_link)
# Save the installer to a file
filename = direct_download_link.split('/')[-1]
with open(filename, 'wb') as file:
file.write(response.content)
# Print the location of the downloaded installer
print("Python 3.8 installer downloaded successfully!")
print("Saved as", filename)
xxxxxxxxxx
# Python 3.8.10 download link
# Windows x86-64 executable installer
# Replace "your_download_path" with the path where you want to save the installer
import urllib.request
url = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe"
download_path = "your_download_path/python-3.8.10-amd64.exe"
urllib.request.urlretrieve(url, download_path)
print("Python 3.8.10 downloaded successfully!")