python

Virt-Manager ImportError: No module named requests

Setelah [upgrade slackbuilds]({% post_url 2016-07-03-upgrade-slackbuilds %}) kemarin ternyata Virtual Machine Managertidak bisa dijalankan. $ virt-manager Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager", line 33, in <module> from virtinst import util as util File "/usr/share/virt-manager/virtinst/__init__.py", line 89, in <module> from virtinst.distroinstaller import DistroInstaller File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 23, in <module> from . import urlfetcher File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 34, in <module> import requests ImportError: No module named requests Ternyata, ada masalah dependensi. ImportError: No module named requestsmenunjukkan tidak adanya modul requests, atau tidak terinstall paket python-requests.

pip InsecurePlatformWarning

Saat melakukan pencarian dengan pip, muncul pesan /usr/lib64/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning /usr/lib64/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.

Install Google Play Downloader

GooglePlayDownloader adalah aplikasi berantar muka grafis (GUI) untuk mengunduh berkas APK dari Google Play Store. Dependensi: python-protobuf (>=2.4) python-requests (>=0.12) python-ndg-httpsclient python-pyasn1 python-wxgtk2.8 (>=2.8) python 2.5+ java (opsional) Itu yang tertulis di README.txt nya GooglePlayDownloader, tapi ternyata, khusus python-wxgtk2.8 diganti saja dengan wxpython. Oke kita install dependensinya dulu (pastikan tersambung internet). easy_install protobuf requests ndg-httpsclient Nah, karena wxpython diinstall dengan easy_install ga berhasil, maka install saja pakai [slackbuildnya]({% post_url 2015-07-18-install-wxpython %}).

Install wxPython

wxPython adalah salah satu toolkit untuk membuat aplikasi grafis dengan python. Untuk menginstallnya mudah, kita install saja slackbuildnya. Pastikan tersambung internet. wget http://slackbuilds.org/slackbuilds/14.1/libraries/wxPython.tar.gz tar xzf wxPython.tar.gz cd wxPython wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2 sh wxPython.SlackBuild installpkg /tmp/wxPython-2.8.12.1-x86_64-2_SBo.tgz

Install pip

Pip akan memudahkan kita semua untuk menginstall paket-paket yang terkait dengan python. wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py python get-pip.py