Skip to content

Instantly share code, notes, and snippets.

@ric2b
Last active May 14, 2016 02:18
Show Gist options
  • Save ric2b/33cf2127f22658bd8dea1b3e564c3e18 to your computer and use it in GitHub Desktop.
Save ric2b/33cf2127f22658bd8dea1b3e564c3e18 to your computer and use it in GitHub Desktop.
  1. Instalar python 3.5 (64bits recomendado se o computador suportar):
  • Em linux já deve vir instalado, corre python3 no terminal para verificar. (também pode ser python mas confirma a versão)
  • Windows/Mac: https://www.python.org/downloads
  1. Confirmar que o pip (o instalador de bibliotecas de python) está instalado, abrindo uma linha de comandos e correndo pip3 --version ou pip --version (confirma que diz ser para python 3.5

  2. Instalar PyQt5.6, o QtDesigner5 e as ferramentas de conversão, pyuic5 e pyrcc5. Se o python for de 64bits o PyQt tb tem de ser.

  • Windows: https://www.riverbankcomputing.com/software/pyqt/download5
  • Linux/Mac: varia com a distribuição, procura como fazes para a tua se não for Arch ou Ubuntu. Tens de garantir que consegues correr pyuic5 e pyrcc5 no terminal, correr python3 ou python e depois fazer import PyQt5 e abrir o QtDesigner.
    • Ubuntu: sudo apt-get install python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools. Para abrir o designer abre /usr/lib/x86_64-linux-gnu/qt5/bin/designer
    • Arch: sudo pacman -S python-pyqt5 qtcreator. para abrir o designer, corre designer no terminal
  1. Adicionar ao Python as bibliotecas Pillow, PyAutoGui e PySerial:
  • pip3 install pillow pyserial ou pip install pillow pyserial seguido de pip3 install pyautogui ou pip install pyautogui (o pillow tem de ser instalado antes do pyautogui)
@carlosfaria94
Copy link

carlosfaria94 commented May 14, 2016

Para Mac OSX El Capitan 10.11.4:

4 - Para instalar com sucesso o pyautogui tive de instalar antes isto: http://pyautogui.readthedocs.io/en/latest/install.html
3 - Instalar PyQt5.6

Tested on El Capitan 10.11.4

1. Define your python3 directory (for example, "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/")
2. Download "http://download.qt.io/official_releases/qt/5.6/5.6.0/qt-opensource-mac-x64-clang-5.6.0.dmg" or any other new version of qt for mac and install it.
3. Download SIP sources here: http://www.riverbankcomputing.com/software/sip/download
4. Download PyQt5-gpl sources here: http://www.riverbankcomputing.com/software/pyqt/download5
5. Go to your downloads by terminal (for example, "cd ~/Downloads")
6. tar xvf PyQt5_gpl-5.6.tar.gz
7. tar xvf sip-4.18.tar.gz
8. cd sip-4.18/
9. python3 configure.py -d /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages --arch x86_64
10. make
11. sudo make install
12. sudo make clean
13. cd ../PyQt5_gpl-5.6/
14. python3 configure.py --destdir /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages --qmake ~/Qt5.6.0/5.6/clang_64/bin/qmake
15. make
16. sudo make install
17. sudo make clean

(créditos: https://gist.github.com/vityafx/e01ab56d28a2c9467cc6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment