python@MAC

一、MAC install APPs

1. apple Store

2. web search

3. brew

install brew: curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1

      use brew example: brew install git, brew uninstall git, 

二、Python

1. www.python.org to get python.

python3.5 is suggested: 1) python3+pyqt5 works for MAC&Windows, or we have too many troubles; 2) python3.6 is not supported by pyinstaller3.2.1 yet.

2. install package for python: 'sudo easy_install <app name>'

3. www.sourceforge.net

4. pipy.python.org

5. pyqt5:

(1) install Xcode from apple store(optional)

(2) install QT by brew install qt5(optional, suggested since QT5 help could be seen, and a lot of QT5)

(3) install pyqt5 automatically: pip3 install PyQt5(suggested) or https://pypi.python.org/pypi/pyqt5-installer/5.7.0

if manually, SIP should be installed first and next is pyqt5. 

http://sourceforge.net/projects/pyqt/files/sip/sip-4.18.1/sip-4.18.1.tar.gz

https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7/PyQt5_gpl-5.7.tar.gz

note: installed packages in  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

6. pyqt4 (NOT usable):

NOT possible since: fatal error:'QTKit/QTDataReference.h' file not found

(1) install Xcode from apple store

(2) install QT4.8.6:

guide: https://www.zhihu.com/question/38792561

download: http://download.qt.io/archive/qt/4.8/4.8.6/

install: http://doc.qt.io/qt-4.8/install-mac.html

(3) install pyQT4.12:

download: https://sourceforge.net/projects/pyqt/?source=typ_redirect

7. use pyinstaller to get a single app:

brew install pyinstaller or pip3 install pyinstaller

pyinstaller -F --noconsole main.py

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值