Why Is Python Mac Os X Library Frameworks
2020-3-28 Mac OS X packages that you can use with PackageMaker to deploy GStreamer with your application Get both the runtime and the development installers from here. On Mac OS X 10.6 (Snow Leopard) you have to install Python 2.7 manually. 2020-4-5 I hope this Top 10 Python Libraries blog helped you to kickstart your learning on the libraries available in Python. After knowing about the top 10 Python libraries, I am pretty sure you want to know more about Python. To know more about Python you can refer the following blogs: Python Tutorial – Python Programming for Beginners. Virtualenv doesn't work correctly with the default system python (2.6) on Mac OS 10.6 (Snow Leopard). To reproduce: unpack the 1.4.3 package cd virtualenv-1.4.3 python virtualenv.py foo This yields: New python executable in foo/bin/pytho. For Python 2.7, this statement invokes the new Python 3.x print format, namely 'print(x)' instead of the old 'print x', and the new division scheme, namely that 3/4 is 0.75, not zero as in the past. This statement is ignored by Python 3.x. Using Python on a Macintosh¶ Author. Bob Savage Python on a Macintosh running Mac OS X is in principle very similar to Python on any other Unix platform, but there are a number of additional features such as the IDE and the.
- Why Is Python Mac Os X Library Frameworks Free
- Python
- Why Is Python Mac Os X Library Frameworks For Windows 7
Mac OS X 10.8及以后的版本都预装了Python 2.7,但是在Mac上(Unix-like OS)上修改Python的版本并不如Windows方便。这篇文章的目标是要将Mac自带的Python 2.7升级为3.4.
正文部分:
Welcome to the pythonnet troubleshooting wiki on Windows, Linux, and OSX! If you get errors first things to check. Latest pythonnet is installed. 2018-9-1 are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: have a problem with brew install (or upgrade, reinstall) a sin.
- 下载并安装新版Python
- 将新版Python复制到系统目录下并修改文件的owner
- 注意这里使用cp而不是mv,否则升级完成后某些包还是会引用到安装目录:/Library/Frameworks/..的lib文件夹,例如无法import readline,导致方向键失效。理论上将指向全部改为/System/Library/..下即可,如果你知道怎么修改,请务必留言。
- sudo cp -r /Library/Frameworks/Python.framework/Versions/3.4/ /System/Library/Frameworks/Python.framework/Versions
- sudo chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.4/
- 修改Python连接文件
- 修改Current连接文件
- sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.4 /System/Library/Frameworks/Python.framework/Versions/Current
- 删除/usr/bin/下python相关连接文件
- /usr/bin/pydoc
- /usr/bin/python
- /usr/bin/pythonw
- /usr/bin/python-config
- 重新创建/usr/bin/下相应连接文件
- sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.4/bin/pydoc3 /usr/bin/pydoc
- sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.4/bin/python3 /usr/bin/python
- sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.4/bin/python3 /usr/bin/pythonw
- sudo ln -s /System/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4m-config /usr/bin/python-config
- 修改Current连接文件
- 修改.bash_profile,指定用户变量(需重启Terminal才能生效)
- PATH=/System/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}
- export PATH
- 输入python -V查看,应为修改后的版本。
有两个地方值得注意:
- 不要删除Mac自带的Python!因为可能Mac或第三方软件会引用到。使用ls -l /System/Library/Frameworks/Python.framework/Versions 可以发现有2.3到2.7的各个版本的连接文件也印证了这一点。网上搜出来的中文帖大概因为是复制粘贴的原因,全都先删了自带的Python再说,不知是出于什么心态。附带Python.org的原文:
- The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software. Remember that if you choose to install a newer Python version from python.org, you will have two different but functional Python installations on your computer, so it will be important that your paths and usages are consistent with what you want to do.
- Python 2.7以后,将/usr/bin/python和/usr/bin/pythonw共同指向/System../Versions/3.4/bin/python3即可,在我新安装Python版本的bin/下是没有pythonw这个命令。附带原文:
- With older versions of Python, there is one Mac OS X quirk that you need to be aware of: programs that talk to the Aqua window manager (in other words, anything that has a GUI) need to be run in a special way. Use pythonw instead of python to start such scripts.With Python 3.4, you can use either python or pythonw.
由于本人接触Linux和Python的时间较短,有错误或可以有更精简的步骤欢迎提出来讨论。_(:3」∠)_
由于Python易学、开源、面向对象、可移植性高、库丰富的特点,近期开始学习Python。百度了解了各款Python IDE后,还是认为Eric比较适合我,所以踏上了安装Eric坎坷之路,从选定工具到安装成功一共花费了8天时间,从Windows到Linux再到Mac,挨个折腾了一遍,Windows的搭建比较简单,下载好相应版本直接运行exe就行了,Linux和Mac下我都是用源码包安装的,所以遇到了不少问题最后,终于在Mac上研究明白了。把搭建的整个过程写下来,和与我一样的小白分享。
PS:Mac与Linux的搭建没什么区别,Linux下的也可参考本文,由于我安装过xcode所以gcc我没有再单独去安装,没有的请根据提示自行安装。
一、准备文件
- Python3.4
- Qt5.5.1
- SIP4.17
- QScintilla2.9.1
- PyQt5.5.1
二、安装过程
1.安装Python3.4
从官网(https://www.python.org/download)下载相应平台的版本安装即可
注意!!
- 如果您是iOS开发者,请不要删除python2.7,因为Xcode使用的2.7的脚本,不支持3以上版本!!!
2.安装Qt5.5.1
从官网(http://qt-project.org/downloads)下载相应平台的版本安装即可,路径设成默认(/Users/*/Qt5.5.1)即可
安装完成需要将Qt5添加到环境变量~/.bash_profile
将下面两行添加进去
Why Is Python Mac Os X Library Frameworks Free
3.安装SIP4.14
下载地址:http://www.riverbankcomputing.com/software/sip/download
4.安装QScintilla/Qt4Qt5
下载地址:http://www.riverbankcomputing.com/software/qscintilla/download
QScintilla2 文件中有3个文件夹的内容要分别安装:Qt4Qt5,designer-Qt4Qt5和Python。
Qt4Qt5文件夹要在PyQt之前安装,designer-Qt4Qt5和Python要在PyQt之后安装,顺序一定要注意!!
5.安装PyQt5.5.1
下载地址:https://www.riverbankcomputing.com/software/pyqt/download5
由于是安装在Python的site-packages里,所以要首先确定包的位置
知道了位置开始编译
注意!!
我在执行make的时候出了一个这样的错误
解决方法:
在/PyQt-gpl-5.5.1/QtPositioning文件夹下创建一个头文件qgeolocation.h,把下面的内容复制进去
继续!
6.安装QScintilla/Python
如果在Python里import不会报错,即代表安装成功,可继续往下进行
7.安装QScintilla/designer-Qt4Qt5
8.安装Eric6
下载地址:http://sourceforge.net/projects/eric-ide/files/eric6/stable/
Python
下载其中的eric6-6.1.1.tar主文件和eric6-i18n-zh_CN.GB2312-6.1.1.tar中文语言包。
Why Is Python Mac Os X Library Frameworks For Windows 7
将两个文件提取出来,将中文语音包的eric复制到主文件内合并
配置Eric6
1、选择Eric6-> preference -> Editor -> Autocompation。勾选所有选框;
2.Editor -> QScintilla 。勾上左右的两个选框,然后在下面source中,选择from Document and API files;
3.Editor -> APIs。勾选Complie APIs Autocompation,在Language中,选择python3。点面下面的Add from installed APIs按钮,选择住需要的.api文件。最后点击Compile APIs;
4、Interface -> Interface。Language选择中文,重启生效。
大功告成!
三、曾经遇到的问题
1.安装QScintilla designer-Qt4Qt5时报错!
原因: Qt没有安装好
2.安装QScintilla Python时报错!
原因:没有安装SIP
3.安装QScintilla Python时报错!
原因:安装顺序错误——先安装的PyQt5,而后安装的QScintilla Qt4Qt5
4.QScintilla的Python安装完成但是在Python中import时报错!
5.安装Eric报错!
4和5问题的原因是一样的,QScintilla的Python没有安装成功
Plan modifications, including downgrades, can be requested at any time. When you established your free iCloud account, you received five GB (gigabytes) of Apple's Internet-based – 'iCloud' – data storage. Delete photos yahoo mail. Your iCloud account and storage space are tied to your Apple ID. If you need more storage space, you can upgrade your iCloud account for a yearly fee to include a larger 15 GB, 25 GB, or 55 GB data storage plan.iCloud data plan upgrades can be arranged directly from your device or Mac.
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。