[PYTHON] Install PyQt5 untuk Pyhton3.4 pada Ubuntu 14.04

Bismillah,

  1. Unduh PyQt5 dan SIP

    http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-5.4.1/PyQt-gpl-5.4.1.tar.gz?r=http%3A%2F%2Fwww.riverbankcomputing.com%2Fsoftware%2Fpyqt%2Fdownload5&ts=1433118831&use_mirror=softlayer-sng

    http://downloads.sourceforge.net/project/pyqt/sip/sip-4.16.7/sip-4.16.7.tar.gz?r=http%3A%2F%2Fwww.riverbankcomputing.com%2Fsoftware%2Fsip%2Fdownload&ts=1433119078&use_mirror=softlayer-sng

  2. Install python3.4, python3.4-dev, idle-python3.4, qt5-default, checkinstall:
    sudo apt-get install python3.4 python3.4-dev qt5-default idle-python3.4 checkinstall
    
    
  3. Edit .bashrc untuk menjadikan python3.4 sebagai default (secara alias)
    sudo nano ~.bashrc
    

    tambahkan:

    #alias untuk python
    alias python=python3.4
    
  4. Ekstrak SIP hasil unduhan, masuk folder SIP hasil ekstrak. Pada folder tersebut jalankan perintah via terminal:
    python configure.py
    make
    sudo checkinstall
    
    
    
  5. Ekstrak PyQt5 hasil unduhan, masuk folder PyQt5 hasil ekstrak. Pada folder tersebut jalankan perintah via terminal:
    python configure.py
    make
    sudo checkinstall
    
    
  6. Jika sudah selesai step ke 5, selanjutnya check apakah sudah berhasil. Buka idle-python3.4 kemudian ketik:
    import PyQt5
    

    tekan enter
    jika tidak muncul error berarti sukses.

Semoga bermanfaat

Advertisements

Tinggalkan komentar:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s