-1

OS :debian8.

debian8@hwy:~$ sudo apt-get install python3
Reading package lists... Done
Building dependency tree   
Reading state information... Done
python3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

Package manager tells python3 had been installed.

debian8@hwy:~$ python3
bash: python3: command not found
debian8@hwy:~$ sudo find /  -name  'python3*'

Nothing output,how to fix the broken package manager?

enter image description here

showkey
  • 482
  • 42
  • 140
  • 295
  • I think this is not for OS, but for [SuperUser](http://superuser.com/). If you run in a terminal: `dpkg -l | grep python3`, find something? – Lucas Feb 11 '17 at 02:56

2 Answers2

0

The first command will show you if the package is installed

~$ dpkg -l python3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-============================================
ii  python3             3.5.1-3        amd64          interactive high-level object-oriented langu

this command will show you the location of python3 program if is installed.

~$ which python3
/usr/bin/python3

re install the package you removed check I have 'ii' and you have 'ri'

apt install --reinstall python3
0
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar -xf Python-3.6.0.tar.xz
cd ./Python-3.6.0
sudo ./configure --prefix=/usr/local/python3.6 --with-ensurepip=install
sudo make
sudo make install
sudo ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3.6
sudo ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3.6

All issues solved.

showkey
  • 482
  • 42
  • 140
  • 295