
노트북을 받자마자 Ubuntu 16.04에서 Ubuntu 18.04로 업그레이드했는데 Python 2를 사용하고 있지 않습니다.
제거해도 안전한가요?
내 터미널에 기본 버전이 다음과 같이 표시됩니다.파이썬 3.7.3.
답변1
달리다
apt purge -s python2.7
-s
무슨 일이 일어날 지에 대한 시뮬레이션은 어디에 있습니까?
그리고 또 무엇을 잃게 될지 직접 확인해보세요.
내 시스템인 Kubuntu 18.04에서는 다음과 같이 표시됩니다.
The following packages were automatically installed and are no longer required:
gir1.2-appindicator3-0.1 gir1.2-gtk-vnc-2.0 gir1.2-keybinder-3.0 gir1.2-libosinfo-1.0 gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0
gir1.2-spiceclientgtk-3.0 gir1.2-vte-2.91 libgovirt-common libgovirt2 libgtk-vnc-2.0-0 libgvnc-1.0-0 libkeybinder-3.0-0 libphodav-2.0-0
libphodav-2.0-common libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libusbredirhost1 libvirt-glib-1.0-0 spice-client-glib-usb-acl-helper
syslinux-common virt-viewer xsltproc
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
boot-repair* boot-sav* boot-sav-extra* glade2script* kubuntu-settings-desktop* python* python-asn1crypto* python-cairo* python-certifi*
python-cffi-backend* python-chardet* python-cryptography* python-dbus* python-enchant* python-enum34* python-gi* python-gi-cairo*
python-gobject* python-gobject-2* python-gtk2* python-gtkspellcheck* python-idna* python-ipaddr* python-ipaddress* python-libvirt*
python-libxml2* python-libxslt1* python-mutagen* python-openssl* python-pkg-resources* python-psutil* python-qt4-dbus* python-requests*
python-six* python-urllib3* python-xdg* python2.7* ranger* recoll* terminator* trash-cli* virt-manager* virtinst* zim*
0 upgraded, 0 newly installed, 44 to remove and 0 not upgraded.
나는 제거하지 않을 것이다파이썬2.7.
이에 대해 더 자세히 살펴보면 이전 버전에서 업그레이드하는 것과 달리 Ubuntu 18.04를 새로 설치했을 때 무엇이 있는지 다음을 통해 확인할 수 있습니다./var/log/installer/initial-status.gz. 나에겐 그런 시스템이 있다.
터미널 창에서 다음을 실행합니다.
$ zgrep "Package: python2.7" /var/log/installer/initial-status.gz
검색은 비어 있으며 해당 문자열을 포함하는 패키지가 없음을 나타냅니다.파이썬2.7설치되었습니다.
귀하의 경우 16.04에서 18.04로 업그레이드한 이후:
당신이 가지고 있다면파이썬-2-7-15rc1귀하의 시스템에서 이는 업그레이드의 일부로 이전 시스템에서 유지되었거나 이후에 이에 의존하는 소프트웨어를 설치했음을 의미합니다.
어느 쪽이든 해당 패키지를 제거하면18.04에(a) 이전 시스템을 사용할 때(업그레이드 전) 또는 (b) 업그레이드 후에 설치한 프로그램에 따라 프로그램이 제거될 수 있다는 점을 주의하면 안전합니다.
18.04 기간 동안 다음과 같은 것을 설치하면구경또는단또는다양성또는가상 관리자, 그렇게 하면파이썬2.7뒤쪽에.