거대한 파이썬 문제

거대한 파이썬 문제

서문: 해결책을 찾아보았으나 아무 소용이 없었습니다.

먼저 다음 명령을 실행하면

$ sudo python --version
Python 2.7.5+

Python2와 3의 경우도 마찬가지입니다.

$ sudo python2 --version
Python 2.7.5+
$ sudo python3 --version
Python 2.7.5+

나는 똑같은 것을 얻습니다.

예를 들어 Firefox를 설치하려고 하면

sudo apt-get install firefox

나는 이 사람이 겪고 있는 문제를 이해한다

Python3을 제거하고 2.7만 사용하고 싶습니다.

첫째, 솔루션이 나에게 적합하지 않았습니다. 오히려 이 사람이 당신이 어떻게 말하는지 정확히 알 수는 없습니다.

둘째, Python3을 다시 설치할 수 없습니다.


업데이트

소스에서 Python 3.4.3을 다시 설치했는데 python3 버전을 확인하면 여전히 Python 2.7.5+가 표시됩니다.


답장하다 마이클 린드먼

root@bl-bc-120431:/home/lab/Desktop/Python-3.4.3# ls -al /usr/bin/ |grep python
lrwxrwxrwx  1 root root          26 Feb  4  2014 dh_pypy -> ../share/dh-python/dh_pypy
-rwxr-xr-x  1 root root        1056 Sep 19  2013 dh_python2
lrwxrwxrwx  1 root root          29 Feb  4  2014 dh_python3 -> ../share/dh-python/dh_python3
-rwxr-xr-x  1 root root          94 Feb 27  2014 idle-python2.7
lrwxrwxrwx  1 root root          23 Feb 27  2014 pdb2.7 -> ../lib/python2.7/pdb.py
lrwxrwxrwx  1 root root          23 Feb 27  2014 pdb3.3 -> ../lib/python3.3/pdb.py
lrwxrwxrwx  1 root root          31 Feb  4  2014 py3versions -> ../share/python3/py3versions.py
lrwxrwxrwx  1 root root          26 Feb  4  2014 pybuild -> ../share/dh-python/pybuild
lrwxrwxrwx  1 root root           9 Sep 19  2013 python -> python2.7
lrwxrwxrwx  1 root root           9 Sep 19  2013 python2 -> python2.7
-rwxr-xr-x  1 root root     3336168 Feb 27  2014 python2.7
lrwxrwxrwx  1 root root          33 Feb 27  2014 python2.7-config -> x86_64-linux-gnu-python2.7-config
-rwxr-xr-x  1 root root         178 Dec 14  2011 python2.7-pyrexc
lrwxrwxrwx  1 root root          16 Sep 19  2013 python2-config -> python2.7-config
lrwxrwxrwx  1 root root          18 Mar 25 13:57 python3 -> /usr/bin/python2.7
-rwxr-xr-x  1 root root     3928976 Feb 27  2014 python3.3m
lrwxrwxrwx  1 root root          10 Feb  4  2014 python3m -> python3.3m
lrwxrwxrwx  1 root root          16 Sep 19  2013 python-config -> python2.7-config
lrwxrwxrwx  1 root root          29 Sep 19  2013 pyversions -> ../share/python/pyversions.py
-rwxr-xr-x  1 root root        2916 Feb 27  2014 x86_64-linux-gnu-python2.7-config
-rwxr-xr-x  1 root root        2885 Feb 27  2014 x86_64-linux-gnu-python2.7-dbg-config
lrwxrwxrwx  1 root root          33 Sep 19  2013 x86_64-linux-gnu-python-config -> x86_64-linux-gnu-python2.7-config

마이클 린드먼(Michael Lindman)에 대한 두 번째 답변

root@bl-bc-120431:/home/lab/Desktop/Python-3.4.3# apt-get install --reinstall python3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apparmor-easyprof apt-clone archdetect-deb bogl-bterm dpkg-repack libdebconfclient0
  libdebian-installer4 python-xkit python3-icu python3-pam rdate sbsigntool
  screen-resolution-extra ubiquity ubiquity-casper ubiquity-frontend-debconf
  ubiquity-ubuntu-artwork
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
57 not fully installed or removed.
Need to get 0 B/9,166 B of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 313616 files and directories currently installed.)
Preparing to replace python3 3.3.2-14ubuntu1 (using .../python3_3.3.2-14ubuntu1_amd64.deb)     ...
/var/lib/dpkg/info/python3.prerm: 5: /var/lib/dpkg/info/python3.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 5: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing /var/cache/apt/archives/python3_3.3.2-14ubuntu1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3.postinst: 47: /var/lib/dpkg/info/python3.postinst: py3compile: not     found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python3_3.3.2-14ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

관련 정보