苹果python安装教程(苹果手机怎么下载python3.7.4)

:暂无数据 2026-08-23 09:00:06 :1

苹果python安装教程(苹果手机怎么下载python3.7.4)

本篇文章给大家谈谈苹果python安装教程,以及苹果手机怎么下载python3.7.4对应的知识点,文章可能有点长,但是希望大家可以阅读完,增长自己的知识,最重要的是希望对各位有所帮助,可以解决了您的问题,不要忘了收藏本站喔。

本文目录

苹果手机怎么下载python3.7.4

从底部链接中下载好安装包,对着他右击。
解压到Python 3.7.4 32 64位,解压完成后双击打开Python 3.7.4 32 64位文件夹.
2.然后,根据自己系统选择是安装32位还是64位.
3.然后,勾选Add Python 3.7 to PATH,然后点击Customize installation
4.然后,点击Next
5.然后,点击红框旁边的Browse(浏览)按钮选择你想要的安装的位置,或者直接在红框中改成你想安装的位置,然后点击Install
6.然后,正在安装,点击Close,点击左下角微软图标按钮,找到Python 3.7,点开,对着IDLE (Python 3.7 64-bit)右击,发送到桌面快捷方式,桌面找到IDLE (Python 3.7 64-bit)图标双击打开.

如何在 Mac OS X 上安装 Python3.3

***隐藏网址***

方法一:

在命令行

***隐藏网址***
brew install python3

就可以用了,简单明了。

方法二:

去python.org下载python3.3的源代码包,调整好Setup.dist,然后./configure && make && sudo make install自己编译下python3就可以了。

最后把/usr/bin/python移动到一边,ln链接下新的python就可以使用了。

其他人也有写用pyenv安装与管理不同版本python可以直接:pyenv install 3.5.0

***隐藏网址***

苹果电脑怎么安装python123考试端

1、通过brew安装python3环境。
2、前往官网下载软件。
3、有安装包的话也可通过U盘安装。

如何在苹果系统上安装PyQt4

安装PtQt4前你需准备: 

  1. Xcode (10.6.1 自带Xcode)

  2. Qt 

  3. SIP 

  4. PyQt4 

创建了一个pyqt文件夹在硬盘根目录下,并将sip-4.12.1.tar.gz和PyQt-mac-gpl-snapshot-4.8.4.tar.gz放到其中并解压。

1、先安装qt,默认安装,这一步大部分人不会有问题,跳过。

2、接下来,打开终端(Terminal,在 Applications(应用程序)/Utilities(实用工具)/ 下),在终端输入:export VERSIONER_PYTHON_PREFER_32_BIT=yes。

3、使用"cd 路径"命令将当前目录设为sip-4.12.1,如:  cd /pyqt/sip-4.12.1/, 然后进行配置(configure)【Re-build SIP in 32bit 】在终端中执行

python configure.py --arch i386
配置(configure)完成后就开始编译,在终端中执行引用make clean(清除以前的安装信息)make
编译完成后就安装,在终端中执行引用sudo make install


在这个过程中没出现错误就是安装成功了 
编译安装PyQt4,过程和上面的一样。 【Build PyQt4 in 32bit 】
在终端中使用"cd 路径"命令将当前目录设为PyQt-mac-gpl-snapshot-4.8.4,如

引用cd /Users/schi/pyqt/PyQt-mac-gpl-snapshot-4.8.4
然后进行配置(configure),在终端中执行引用python configure.py --use-arch i386
配置时会遇到引用Determining the layout of your Qt installation... 
This is the GPL version of PyQt 4.6 (licensed under the GNU General Public 
License) for Python 2.6.2 on darwin. 
Type ’2’ to view the GPL v2 license. 
Type ’3’ to view the GPL v3 license. 
Type ’yes’ to accept the terms of the license. 
Type ’no’ to decline the terms of the license. 
Do you accept the terms of the license? 


输入yes,再按回车就行 
配置(configure)完成后就开始编译,在终端中执行

引用make cleanmake


编译比较花时间,请耐心等待。

编译完成后就安装,在终端中执行

引用sudo make install


在这个过程中没出现错误就是安装成功了  
也可以在IDLE中导入PyQt4的模块,能成功导入就说明安装成功

Python代码 

from PyQt4 import QtCore, QtGui  

下面分析一下安装过程中可能遇到的问题:

1.问题如下

##############

ld: warning: in /Library/Frameworks/Python.framework/Python, missing required architecture x86_64 in file
Undefined symbols:
  "_Py_Initialize", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyLong_AsVoidPtr", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyErr_Print", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyString_FromString", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyType_IsSubtype", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyModule_GetDict", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_CallObject", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_CallFunctionObjArgs", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyList_Append", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_Py_IsInitialized", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyDict_Next", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyImport_ImportModule", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_GetAttrString", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make Error 1
make: *** Error 2
这个问题的原因就是:qt是在32位mac上编译的,但pyqt默认是在64位机子上编译的,所以我们在编译的时候要制定编译环境:是i386 还是x86_64.

请参考如下的信息:

The problem is that the Qt library is 32bit while, by default, python builds PyQt4 in 64bit. That caused problem when it tried to link 64bit object files with 32bit Qt library. To fix this issue, we need to force python to build PyQt4 in 32bit, and we also need to re-build SIP in 32bit mode. If you use the python version that comes with Mac OS (2.5 for Snow Leopard), make sure that it runs in 32bit mode by issuing the command

2.个问题如下:

》》》 from PyQt4 import QtGui

Traceback (most recent call last):

File "《stdin》", line 1, in 《module》

ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtGui.so, 2): Symbol not found: __ZN13QPyTextObject16staticMetaObjectE

 Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtGui.so

Expected in: flat namespace

in /Library/Python/2.6/site-packages/PyQt4/QtGui.so

这个问题是所有的包安装都没有问题但是当导入QtGui或其他包时,总报这个问题,这个问题的原因是,当前pyqt release的包本身带的一个bug,PyQt-mac-gpl-snapshot-4.8.3, 所以你下载下个要release的包就可以了。如我下的是:PyQt-mac-gpl-snapshot-4.8.4。

下面给大家介绍一下我写的自动安装这些程序的python源码:

#!/usr/bin/env python
"""
Automated installer for Python 2.6 (final)

This installer is able to handle any previous
versions of Python.

NOTE: This file *must* be copied to
//nssgsvr/tools/pyInstall_OSX when modified!

"""

import os
import sys
import re
import shutil
import platform
import tarfile

# Constants
PYTHON_PKGS = {"dmgFile" : "python-2.6.1-macosx2008-12-06.dmg",
               "mpkgList": }
#WXPYTHON_PKGS = {"dmgFile" : "wxPython2.8-osx-unicode-2.8.9.2-universal-py2.6.dmg",
#               "mpkgList":  }
#ANGELIA
XCODE_PKGS = {"dmgFile" : None,  "mpkgList":  }

QT_PKGS = {"dmgFile" : "qt-mac-cocoa-opensource-4.6.2.dmg",
             "mpkgList":  }

THIRD_PARTY_INSTALL =

# Environment constants
TCSH_ENV_FILE = ’/etc/csh.login’
BASH_ENV_FILE = ’/etc/profile’
SCRIPTS_ROOT_ENV = "TEST_SCRIPTS_ROOT"

TARGET_VER = "2.6"
IS_POSIX = (os.name == ’posix’)
IS_MAC = (sys.version.find(’Apple’) != -1)
IS_OSX = (IS_MAC and IS_POSIX)
IS_OSX_LEOPARD = (IS_OSX and platform.mac_ver().startswith(’10.5’))
IS_OSX_SNOWLEOPARD = (IS_OSX and platform.mac_ver().startswith(’10.6’))

# NSSGSVR Constants
MOUNT_POINT = "/Volumes/Test"
HOSTSERVER = "NSSGSVR.global.avidww.com"     # Server that contains SQA scripts
SHARE = "TEST"             # NSSGSVR share that contains the Python scripts directory
USER = "qatest"
PASSWD = "Cmqat/$/$/$"     # slashes needed to escape special character ’$’

##################################################################################

class InstallerError(Exception):
    """ Installer Exception class """
    def __init__(self, description):
        self.desc = description

    def __str__(self):
        return self.desc

class PkgInstaller:
    """ Installer class for pkg files."""
    def __init__(self, packageName, mpkgList, dmgFile = None ):
        """
        packageName (str)  Name of "package" to be installed
        dmgFile     (str)  Path to dmg file to mount
        mpkgList    (list) List of mpkg files to launch when dmg file is mounted
        """
        self.dmgFile = dmgFile
        self.packageName = packageName
        self.mpkgList = mpkgList

        self.mountpoint = os.path.join(os.getcwd(), self.packageName)
        self.removeMountPoint = False

        if not type(self.mpkgList) == list:
            raise InstallerError("Expected list for parameter mpkgList received %s" % /
                                 type(self.mpkgList))

        # Mountroot must exist for hdiutil to succeed.
        if not os.path.exists(self.mountpoint):
            print "Creating mountroot %s" % (self.mountpoint)
            os.makedirs(self.mountpoint)
            self.removeMountPoint = True

    def _cleanup(self):
        """
        ## Performs cleanup
        """
        unmount_cmd = "hdiutil unmount %s" % (self.mountpoint)

        if self.dmgFile:
            print "Unmounting %s" % (self.mountpoint)
            ret = os.system(unmount_cmd)
            if ret:
                raise InstallerError("hdiutil unmount of %s failed: errno %d" % /
                                 (self.mountpoint, ret))
            
            if self.removeMountPoint:
                print "Removing directory %s" % (self.mountpoint)
                os.rmdir(self.mountpoint)

    def _mount_dmg(self):
        """ Mounts the dmg file. """
        hdiutil_mount = "hdiutil mount %s -mountpoint %s" % (self.dmgFile,
                                                         self.mountpoint)
        
        if os.path.exists(self.dmgFile):
            print "Mounting %s" % (self.dmgFile)
            ret = os.system(hdiutil_mount)
            if ret:
                raise InstallerError("hdiutil mount of %s failed: errno %d" % (self.dmgFile, ret))
        else:
            raise InstallerError("DMG file %s does not exist" % (self.dmgFile))
            
    def _launch_pkgs(self):
        """ Launches the pkg installers. """
        for install_file in self.mpkgList:
            if install_file.endswith(’pkg’):
                install_path = os.path.join(self.mountpoint, install_file)
                if not os.path.exists(install_path):
                    raise InstallerError("File %s does not exist" % (install_path))
                # ’installer’ is Apple’s package installer tool.
                # -pkg specifies the package to be installed
                # -target specifies the destination install volume
                # -allow allows the installer to automatically upgrade any previous packages
                # see ’man installer’ for more details.
                cmd = ’installer -pkg "%s" -target / -verbose -allow’ % (install_path)
                ret = os.system(cmd)
                if ret:
                    msg = "Package %s failed to install: err %d" % (install_file, ret)
                    raise InstallerError(msg)
            else:
                raise InstallerError("File %s is not a valid package file" % install_file)
                
    def install(self):
        """ Main installer method. """

        print "Installing package %s" % (self.packageName)
        if self.dmgFile:  
            self._mount_dmg()
        self._launch_pkgs()
        self._cleanup()
        print "Finished installing package %s" % (self.packageName)

def set_all_test_scripts_root(path):
    """
    ## Sets TEST_SCRIPTS_ROOT to 《path》 for
    ## both Bash and Tcsh shells if needed.
    """
    bash_line = ’export TEST_SCRIPTS_ROOT="%s"’ % (path)
    tcsh_line = ’setenv TEST_SCRIPTS_ROOT "%s"’ % (path)

苹果电脑怎么下载python

  • 为了启动IDLE需要在Mac上找到终端,一般在控制台找到“其他-终端”。也可以直接搜索在输入框中搜索“终端”

    请点击输入图片描述

  • 2

    终端启动后输入命令“idle”并“Enyer”键盘,这是会弹出新页面。

    请点击输入图片描述

  • 3

    弹出新页面如下图。这是python shell。python已经运行并等待你输入命令。现在我们可以看到python已经安装成功。

    请点击输入图片描述

  • 4

    为了检验是否安装成功,我们继续输入 print “Hello worid!” 并按“Eenter”看是否能答应如下图。

    请点击输入图片描述

文章分享结束,苹果python安装教程和苹果手机怎么下载python3.7.4的答案你都知道了吗?欢迎再次光临本站哦!

苹果python安装教程(苹果手机怎么下载python3.7.4)

本文编辑:admin

更多文章:


compare with造句(用compared with和compared to造句)

compare with造句(用compared with和compared to造句)

“compare with造句”相关信息最新大全有哪些,这是大家都非常关心的,接下来就一起看看compare with造句(用compared with和compared to造句)!

2026年10月10日 23:30

xshell软件(Xshell怎么更改字体大小)

xshell软件(Xshell怎么更改字体大小)

各位老铁们好,相信很多人对xshell软件都不是特别的了解,因此呢,今天就来为大家分享下关于xshell软件以及Xshell怎么更改字体大小的问题知识,还望可以帮助大家,解决大家的一些困惑,下面一起来看看吧!

2026年10月10日 22:50

tensorflow与keras对应版本(为什么tensorflow2.8没有keras)

tensorflow与keras对应版本(为什么tensorflow2.8没有keras)

各位老铁们好,相信很多人对tensorflow与keras对应版本都不是特别的了解,因此呢,今天就来为大家分享下关于tensorflow与keras对应版本以及为什么tensorflow2.8没有keras的问题知识,还望可以帮助大家,解决

2026年10月10日 22:10

个人网站首页界面(深圳社会保险服务个人网页主页)

个人网站首页界面(深圳社会保险服务个人网页主页)

“个人网站首页界面”相关信息最新大全有哪些,这是大家都非常关心的,接下来就一起看看个人网站首页界面(深圳社会保险服务个人网页主页)!

2026年10月10日 22:00

maven仓库jar网站(如何在maven仓库中添加jar包)

maven仓库jar网站(如何在maven仓库中添加jar包)

这篇文章给大家聊聊关于maven仓库jar网站,以及如何在maven仓库中添加jar包对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。

2026年10月10日 19:50

利用地理空间数据云下载dem数据怎么知道具体位置?DEM数据获取

利用地理空间数据云下载dem数据怎么知道具体位置?DEM数据获取

各位老铁们好,相信很多人对dem数据都不是特别的了解,因此呢,今天就来为大家分享下关于dem数据以及利用地理空间数据云下载dem数据怎么知道具体位置的问题知识,还望可以帮助大家,解决大家的一些困惑,下面一起来看看吧!

2026年10月10日 18:30

单例模式的几种实现方式(么是单例模式,并写出单例模式的2种实现方式)

单例模式的几种实现方式(么是单例模式,并写出单例模式的2种实现方式)

“单例模式的几种实现方式”相关信息最新大全有哪些,这是大家都非常关心的,接下来就一起看看单例模式的几种实现方式(么是单例模式,并写出单例模式的2种实现方式)!

2026年10月10日 17:10

easyui和elementui哪个好(element-ui 可以做网站吗)

easyui和elementui哪个好(element-ui 可以做网站吗)

其实easyui和elementui哪个好的问题并不复杂,但是又很多的朋友都不太了解element-ui 可以做网站吗,因此呢,今天小编就来为大家分享easyui和elementui哪个好的一些知识,希望可以帮助到大家,下面我们一起来看看这

2026年10月10日 14:00

网页设计代码动漫(网页制作中如何插入FLASH动画啊)

网页设计代码动漫(网页制作中如何插入FLASH动画啊)

大家好,网页设计代码动漫相信很多的网友都不是很明白,包括网页制作中如何插入FLASH动画啊也是一样,不过没有关系,接下来就来为大家分享关于网页设计代码动漫和网页制作中如何插入FLASH动画啊的一些知识点,大家可以关注收藏,免得下次来找不到哦

2026年10月10日 12:50

tcp ip协议体系大致可以分成(TCP/IP体系共有几个层次)

tcp ip协议体系大致可以分成(TCP/IP体系共有几个层次)

大家好,关于tcp ip协议体系大致可以分成很多朋友都还不太明白,不过没关系,因为今天小编就来为大家分享关于TCP/IP体系共有几个层次的知识点,相信应该可以解决大家的一些困惑和问题,如果碰巧可以解决您的问题,还望关注下本站哦,希望对各位有

2026年10月10日 12:30

最近更新

compare with造句(用compared with和compared to造句)
2026-10-10 23:30:08 浏览:0
戴尔inspiron1440还能用吗(dell inspiron1440,几个月没开机了,现在一插适配器,适配器灯就灭)
2026-10-10 23:20:03 浏览:0
xshell软件(Xshell怎么更改字体大小)
2026-10-10 22:50:07 浏览:0
热门文章

by网站域名444(444ppp现在是什么域名)
2026-08-19 20:20:31 浏览:13
韩国大片视频mv(韩国20个感人mv)
2026-07-11 13:10:02 浏览:12
标签列表