I have Linux Mint 18. I wanted to install Python 3.9.13 tonight, which I downloaded from the Python website.Then I extracted it.
When the install finished on terminal, I noticed it installed Python version 3.5.1 instead. What happened?
dave@dave-Z170XP-SLI ~ $ python3.9 --version
No command 'python3.9' found, did you mean:
Command 'python3.5' from package 'python3.5-minimal' (main)
python3.9: command not found
Last edited by LockBot on Sun Jan 01, 2023 11:00 pm, edited 2 times in total.
Reason:Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 18 has reached end of life April last year. It is no longer supported and should be considered unsafe to use online, for one because you're not getting security updates for the web browser. Before you spend a lot of time trying to untangle this Python question I suggest you consider if it is not time to upgrade to a supported Linux Mint version. apt install python3.9 works on Linux Mint 20.3 and upcoming Linux Mint 21 (a beta likely this month) has Python 3.10 as default.
You won't be able to apt install python3.9 on Linux Mint 18 and AFAIK the Python website only has source code downloads for Linux, not an installable package. If you want to go that route you'll have to compile it from source yourself.
Hello cessnat37
1. You should not be using Mint 18, it stopped receiving updates more than a year ago! It's not safe anymore.
2. Can you share your system info? We need the output of the Terminal command inxi -Fxxmprz
3. How did you install Python 3.9? What file did you download (links please), what command did you run in the Terminal to install it?
4. Generally it's not a good idea to manually install different Python versions because the system depends on Python, so you can break your system.
I used this command: sudo apt install python3.9. The install completed.
But those two things have nothing to do with each other. The apt install command download and installs from the software repositories. It can't compile source code for you, that you downloaded from the website.
If the command completed what does apt version python3.9 say? If blank what does dpkg -l | grep python3 answer.
Are you maybe not on Linux Mint 18 but since on a newer version? Share output of inxi -Sr command.
dave@dave-Z170XP-SLI ~ $ inxi -Sr
System: Host: dave-Z170XP-SLI Kernel: 4.4.0-21-generic x86_64 (64 bit)
Desktop: Cinnamon 3.0.6 Distro: Linux Mint 18 Sarah
Repos: Active apt sources in file: /etc/apt/sources.list.d/deadsnakes-ppa-xenial.list
deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/google-chrome.list
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com sarah main upstream import backport #id:linuxmint_main
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner
inxi -Fxxmprz
System: Host: dave-Z170XP-SLI Kernel: 4.4.0-21-generic x86_64 (64 bit gcc: 5.3.1)
Desktop: Cinnamon 3.0.6 (Gtk 3.18.9-1ubuntu3) dm: mdm Distro: Linux Mint 18 Sarah
Machine: System: Gigabyte product: Z170XP-SLI
Mobo: Gigabyte model: Z170XP-SLI-CF v: x.x Bios: American Megatrends v: F6 date: 03/07/2016
CPU: Dual core Intel Core i3-6100 (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 14785
clock speeds: min/max: 800/3700 MHz 1: 799 MHz 2: 984 MHz 3: 799 MHz 4: 799 MHz
Memory: No dmidecode memory data: try newer kernel.
Graphics: Card: Intel HD Graphics 530 bus-ID: 00:02.0 chip-ID: 8086:1912
Display Server: X.Org 1.18.3 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.00hz
GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
GLX Version: 3.0 Mesa 11.2.0 Direct Rendering: Yes
Audio: Card Intel 100 Series/C230 Series Family HD Audio Controller
driver: snd_hda_intel bus-ID: 00:1f.3 chip-ID: 8086:a170
Sound: Advanced Linux Sound Architecture v: k4.4.0-21-generic
Network: Card: Intel Ethernet Connection (2) I219-V
driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6 chip-ID: 8086:15b8
IF: enp0s31f6 state: down mac: <filter>
Drives: HDD Total Size: 500.1GB (5.3% used)
ID-1: /dev/nvme0n1 model: N/A size: 500.1GB serial: S3EUNX0J813105K
ID-2: /dev/sda model: WDC_WD5003AZEX size: 500.1GB serial: WD-WCC3F3TS3AAD
Partition: ID-1: / size: 443G used: 9.8G (3%) fs: ext4 dev: /dev/sda1
ID-2: swap-1 size: 17.05GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID: System: supported: N/A
No RAID devices: /proc/mdstat, md_mod kernel module present
Unused Devices: none
Sensors: System Temperatures: cpu: 29.8C mobo: 27.8C
Fan Speeds (in rpm): cpu: N/A
Repos: Active apt sources in file: /etc/apt/sources.list.d/deadsnakes-ppa-xenial.list
deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/google-chrome.list
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com sarah main upstream import backport #id:linuxmint_main
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner
Info: Processes: 207 Uptime: 38 min Memory: 908.5/15925.3MB
Init: systemd v: 229 runlevel: 5 default: 2 Gcc sys: 5.4.0
Client: Shell (bash 4.3.421 running in gnome-terminal-) inxi: 2.2.35
Last edited by karlchen on Sun Jul 03, 2022 6:52 am, edited 1 time in total.
Reason:applied [code] [/code] tags around terminal commands and their output, preserves proper terminal screen formatting
There's no python3.9 installed. That's clear. The deadsnakes PPA you have also no longer supports your Linux Mint version.
Does apt policy python3.9 even offer a version of that package?
You didn't share what apt install python3.9 command output. Just that it worked. It doesn't look like it did. If you run it again what is the exact and complete output of the command, after you enter your password.
Last edited by karlchen on Sun Jul 03, 2022 6:53 am, edited 1 time in total.
Reason:applied [code] [/code] tags around terminal commands and their output, preserves proper terminal screen formatting
There you go. You're been installing postgresql-plpython3-9.5. That is "PL/Python 3 procedural language for PostgreSQL 9.5" and not a new Python version.
If you want a newer Python version you need to first migrate to a Linux Mint version that is not yet end of life.
Ok. Thanks. I'll have 20.3 installed soon. I got the bootable USB drive ready and ISO verification is done. I need to make sure all my files are saved.