1. 程式人生 > >如何在蘋果系統(Mac OS X)上安裝PyQt4

如何在蘋果系統(Mac OS X)上安裝PyQt4

下面是我的安裝情況:

我的系統是Mac OS X 10.6.3,64位的,

我的系統是Mac OS X 10.6.364位的,我在這裡先將64位轉為32位的作業系統,在命令列下輸入:

defaults write com.apple.versioner.python Prefer-32-Bit -bool yes,回車。

轉化後,系統需要重新啟動,重啟後,你可以在這裡看到。這是系統就是32位核心的。

要安裝pyqt的python版本是 2.6.1
安裝PtQt4前你需準備:
  • Xcode (10.6.1 自帶Xcode)
  • Qt - 我使用的是qt-mac-cocoa-opensource-4.6.2.dmg
  • SIP - 我使用的是sip-4.12.1.tar.gz
  • PyQt4 - 我使用的是PyQt-mac-gpl-snapshot-4.8.4.tar.gz

建立了一個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 clean make


編譯比較花時間,請耐心等待。

編譯完成後就安裝,在終端中執行

引用 sudo make install


在這個過程中沒出現錯誤就是安裝成功了 

也可以在IDLE中匯入PyQt4的模組,能成功匯入就說明安裝成功

Python程式碼 複製程式碼
  1. 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[1]: *** [libpythonplugin.dylib] Error 1
make: *** [all] 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.

"""

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": ["MacPython.mpkg"] }
#WXPYTHON_PKGS = {"dmgFile" : "wxPython2.8-osx-unicode-2.8.9.2-universal-py2.6.dmg",
#               "mpkgList":  ["wxPython2.8-osx-unicode-universal-py2.6.pkg"] }
#ANGELIA
XCODE_PKGS = {"dmgFile" : None,  "mpkgList":  ["Xcode.mpkg"]}

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

THIRD_PARTY_INSTALL = ["sip-4.12.1", "PyQt-mac-gpl-snapshot-4.8.4","Pyro-3.9.1", "pyserial-2.4"]

# 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()[0].startswith('10.5'))
IS_OSX_SNOWLEOPARD = (IS_OSX and platform.mac_ver()[0].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)
   
    scripts_root_bash = is_export_line_present(BASH_ENV_FILE, bash_line)
    scripts_root_tcsh = is_export_line_present(TCSH_ENV_FILE, tcsh_line)

    if not scripts_root_bash: _set_export_line(BASH_ENV_FILE, bash_line)
    if not scripts_root_tcsh: _set_export_line(TCSH_ENV_FILE, tcsh_line)

def set_all_pythonpaths(path):
    """
    ## Sets PYTHONPATH to <path> for both
    ## Bash and Tcsh shells if needed.
    """
    bash_line = 'export PYTHONPATH="%s"' % (path)
    tcsh_line = 'setenv PYTHONPATH "%s"' % (path)

    bash_set = is_export_line_present(BASH_ENV_FILE, bash_line)
    tcsh_set = is_export_line_present(TCSH_ENV_FILE, tcsh_line)

    if not bash_set: _set_export_line(BASH_ENV_FILE, bash_line)
    if not tcsh_set: _set_export_line(TCSH_ENV_FILE, tcsh_line)
   
def _set_export_line(filepath, export_line):
    """
    ## Exports PYTHONPATH via global environment file
    """
    try:
        fd = open(filepath, 'a')
        print "Adding line %s to file %s" % (export_line, filepath)
        fd.write('/n' + export_line + '/n')
        fd.close()
    except IOError, e:
        if (e.errno == 13):
            print "Unable to set PYTHONPATH on file %s: Permission denied" % (filepath)
            raise

def is_export_line_present(filepath, export_line):
    """
    ## Checks to see if <export_line> is present
    ## in file <filepath>.
    """
    is_set = False
    path_regex = re.compile("^%s$" % (export_line))

    try:
        fd = open(filepath, 'r')
    except:
        print "Unable to open %s for reading" % (filepath)
        raise
   
    lines = fd.readlines()
    fd.close()
    for line in lines:
        if path_regex.match(line.strip('/n')):
            is_set = True
            break

    return is_set

def mount_nssgsvr():
    """
    ## Mounts NSSGSVR
    """
    mount_cmd = 'mount_smbfs '
    mount_cmd += '//%s:%[email protected]%s/%s %s' % (USER, PASSWD, HOSTSERVER, SHARE, MOUNT_POINT)
   
    if not os.path.ismount(MOUNT_POINT):
        if not os.path.exists(MOUNT_POINT):
            os.mkdir(MOUNT_POINT)

        mount_retval = os.system(mount_cmd)
        if mount_retval:
            raise InstallerError("Unable to mount %s" % (HOSTSERVER))

def get_python_version():
    """
    ##  Returns the current version of Python
    """
    return sys.version.split()[0]

def strvercmp(ver1, ver2):
    """
    ##  Compares two version strings.
    ##
    ##  Returns -1 if ver1 < ver2
    ##  Returns 0 if ver1 == ver2
    ##  Returns 1 if ver1 > ver2
    """
    ver1 = ver1.strip()
    ver2 = ver2.strip()

    return cmp([int(num) for num in ver1.split('.')],
               [int(num) for num in ver2.split('.')])

########################################################################################
## Main routine

def main(basePath):
    """
    ##  Main routine.
    """
    current_python_version = get_python_version()

    # If the machine is not Leopard and attempting
    # to install Python 2.5 over a later version of Python.
    if not IS_OSX_SNOWLEOPARD:
        if strvercmp(current_python_version, TARGET_VER) >= 0:
            print "Attempting to install the same or an older version of Python"
            print "Current version %s" % (current_python_version)
            print "Attemping to install %s" % (TARGET_VER)
            sys.exit(1)

    else:
        # set Snow Leopard to use only 32 bit
        profile_handle = open("/etc/profile", 'a')
        profile_handle.write("/nexport VERSIONER_PYTHON_PREFER_32_BIT=yes/n")
        profile_handle.close()
           
           
    # Change to directory containing installer script
    if basePath: os.chdir(basePath)

    # If the Scripts root install path environment variable already
    # exists, use that as the default path. Otherwise use /python_scripts
    if SCRIPTS_ROOT_ENV in os.environ.keys():
        SCRIPTS_ROOT_DEFAULT = os.environ[SCRIPTS_ROOT_ENV]
    else:
        SCRIPTS_ROOT_DEFAULT = "/python_scripts"

    print "NOTE: You *must* be connected to the network to complete this installation"
    inpath = raw_input("Enter script install path (DEFAULT: '%s'): " % (SCRIPTS_ROOT_DEFAULT))

    if inpath != "":
        SCRIPTS_ROOT = inpath
    else:
        SCRIPTS_ROOT = SCRIPTS_ROOT_DEFAULT

    # Only install the Python packages if we're not Snow Leopard.
    # Python 2.6.1 and wxPython are installed by default in Snow Leopard.
    if IS_OSX_SNOWLEOPARD:

        # Need to make sure /etc/profile is readable and writable
        # only by this user (root). Leopard by default
        # makes /etc/profile just read-only by root.
        assert(os.path.exists(BASH_ENV_FILE))
        os.chmod(BASH_ENV_FILE, 0644)
       
    else:
        PYTHON = PkgInstaller("Python", PYTHON_PKGS['dmgFile'], PYTHON_PKGS['mpkgList'])
        PYTHON.install()
        #WXPYTHON = PkgInstaller("wxPython", WXPYTHON_PKGS['dmgFile'], WXPYTHON_PKGS['mpkgList'])
        #WXPYTHON.install()
   
        # Make sure python/pythonw symbolic links in /usr/bin
        # points to the version located in /usr/local/bin because
        # that binary will be from the Framework we installed above
        python_symlink_src = '/usr/local/bin/python'
        python_link = '/usr/bin/python'
        if os.path.exists(python_link):
            os.rename(python_link, python_link + '.old')
        os.symlink(python_symlink_src, python_link)

        pythonw_symlink_src = '/usr/local/bin/pythonw'
        pythonw_link = '/usr/bin/pythonw'
        if os.path.exists(pythonw_link):
            os.rename(pythonw_link, pythonw_link + '.old')
        os.symlink(pythonw_symlink_src, pythonw_link)
       
        idle_link = '/usr/bin/idle'
        # Add symlink for idle
        if not os.path.exists(idle_link):
            idle_symlink_src = '/Library/Frameworks/Python.framework/Versions/Current/bin/idle'
            os.symlink(idle_symlink_src, idle_link)
       

    # Set PYTHONPATH and TEST_SCRIPTS_ROOT if not set.
    set_all_pythonpaths(SCRIPTS_ROOT)
    set_all_test_scripts_root(SCRIPTS_ROOT)
   
    #install necessary software    
    QT = PkgInstaller("Qt", QT_PKGS['mpkgList'], QT_PKGS['dmgFile'])
    QT.install()
    XCODE = PkgInstaller("xcode", XCODE_PKGS['mpkgList'])
    XCODE.install()
   
    # Install third party modules
    for module in THIRD_PARTY_INSTALL:
        install_dir = os.path.join(basePath, module)
        if os.path.exists(install_dir): 
            os.chdir(install_dir)
            if module in ['sip-4.12.1', 'PyQt-mac-gpl-snapshot-4.8.4']:
                if module == 'sip-4.12.1' :
                    os.system('python configure.py --arch i386')
                elif module == 'PyQt-mac-gpl-snapshot-4.8.4':
                    os.system('python configure.py --use-arch i386')
                os.system('make clean')
                os.system('make')
                os.system('make install')
            else:
                print "/n#### INSTALL %s ####" % module
                os.system('python setup.py install')  
            os.chdir('..')
        else:
            raise EnvironmentError("%s install directory not found!" % install_dir)  
       
    # Mount NSSGSVR to get update.py
    mount_nssgsvr()
   
    # Install and run update.py
    if not os.path.exists(SCRIPTS_ROOT):
        os.makedirs(SCRIPTS_ROOT)

    update_path = os.path.join(SCRIPTS_ROOT, "update.py")
    if os.path.exists(update_path):
        os.remove(update_path)

    print "Installing and running %s" % (update_path)
    remote_update_path = os.path.join(MOUNT_POINT, 'sqatools', 'ISIS_Main','python_scripts_26', 'testware', 'py', 'update.py')
    shutil.copy2(remote_update_path, SCRIPTS_ROOT)
    os.chdir(SCRIPTS_ROOT)
    os.path.exists("update.py")
    os.system("python update.py -d%s -t " % SCRIPTS_ROOT)

    # Change permissions for SCRIPTS_ROOT directory (since
    # the script was run as root).
    if os.path.exists(SCRIPTS_ROOT):
        os.system("chown -R Administrator %s" % SCRIPTS_ROOT)
        os.system("chmod -R og+rwx %s" % SCRIPTS_ROOT)

    # Also change permissions for SCRIPTS_ROOT.old directory because
    # of any backups made during the update executed above
    scripts_root_old = SCRIPTS_ROOT + '.old'
    if os.path.exists(scripts_root_old):
        os.system("chown -R Administrator %s" % scripts_root_old)
        os.system("chmod -R og+rwx %s" % scripts_root_old)

    raw_input("Please quit and relaunch the Terminal application for the changes to take effect.")


if __name__ == "__main__":
   
    if os.name != 'posix':
        raise EnvironmentError("Invalid operating system")
   
    if os.getuid() != 0:
        print "Current user: /"%s/"" % (os.getlogin())
        raise EnvironmentError("Script must be run as root")

    base_path = os.path.dirname(sys.argv[0])
    main(base_path)

相關推薦

如何在蘋果系統(Mac OS X)安裝PyQt4

下面是我的安裝情況: 我的系統是Mac OS X 10.6.3,64位的, 我的系統是Mac OS X 10.6.3,64位的,我在這裡先將64位轉為32位的作業系統,在命令列下輸入: defaults write com.apple.versioner.python Pre

蘋果系統 Mac OS X Yosemite 正式版安裝程式映象下載 (10.10 新功能特性總結)

轉自:http://www.iplaysoft.com/osx-yosemite.html 最新版的 Mac OS X Yosemite 系統採用了扁平化的設計風格,增加了大量的新特性,其中蘋果重點針對跨裝置跨平臺無縫切換的需求,提供了全新的 HandOff 、iC

蘋果系統Mac OS X Yosemite 10.10 安裝必看

扁平化來襲 OS X 10.10 Yosemite 下載的安裝包要先放入程式才可以進行安裝升級 升級建議使用Time Machine進行備份,以防意外 下載安裝之後第一次能正常登入,但是很多dock圖示不能正常顯示,再次開啟時就一直卡再登

Mac OS X安裝OpenVPN

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

TensorFlow資料彙總 在 Mac OS X 安裝 TensorFlow

1、使用 virtualenv 安裝TensorFlow 按照以下步驟安裝 TensorFlow: 開啟終端(一個 shell),你將在這個終端中執行隨後的步驟 通過以下命令安裝 pip 和 virtualenv: $ sudo easy_install pip $ sudo pip in

Mac OS X安裝ASP.NET 5(譯文)

ASP.NET 5 執行在包括OS X的可用於多個平臺的.NET Execution Environment(DNX)上。本文介紹如何在OS X上通過HomeBrew安裝DNX和ASP.NET 5。 本文包括: 在OS X上安裝ASP.NET 在OS X上安裝ASP.NET ASP.NET

Mac OS X安裝 dnsmasq 來搭建DNS伺服器

使用homebrew 安裝dnsmasq brew install dnsmasq 複製示例配置檔案 cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.c

Mac OS X安裝Python

1.安裝 Homebrew 只需開啟 終端 或個人常用的終端模擬器並執行: $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"執行這段指令碼

Mac os Xopenssl從安裝到更新

step 1: 開啟官網:https://www.openssl.org/source/  然後順手打開了終端,輸入了openssl version  居然得到了迴應OpenSSL 0.9.8zh 14 Jan 2016  說明已經有openssl了,應該不需要裝了吧……

Mac OS X 乾淨解除安裝軟體

      在Mac OS X上解除安裝軟體一般都很簡單--在“應用程式”目錄刪除該軟體。很多軟體會有一些配置檔案或者該軟體的需要使用的檔案留在磁碟上,但不會影響電腦使用。       如果想要刪除

蘋果新手Mac OS X 使用筆記--------系統目錄結構

在OS X的系統中,不再有Windows使用者熟悉的C盤、D盤,這是因為OS X底層是Unix系統,其目錄機構符合Unix系統的規範。MAC機器主機板使用了Intel主導的EFI標準,硬碟分割槽格式採用GPT。這種EFI+GPT的方式相比傳統的BIOS+MBR的方式有很多好

How to Install wget in OS X如何在Mac OS X安裝wget並解決configure: error:

configure openssl usr local 解壓 fix 官網下載 .org get 1.ftp://ftp.gnu.org/gnu/wget/官網下載最新的安裝包 wget-1.19.tar.gz 2.打開終端輸入 tar zxvf wget-1.9.1.ta

Mac OS X安裝Vue腳手架(vue-cli)

前言 Vue作為前端三大框架(Angular,React,Vue)之一,號稱是最簡單,最容易上手的框架,同時也是行內的大趨勢,還可以用來開發最火的小程式。具有開發快,雙向資料流等特點,有些人認為Vue是Angular和React的結合,既有Angular的模板語法也有React的元件化體系,以至於促使其發展

Mac OS X 的Apache配置

Mac系統自帶apache伺服器 檢視apache版本 sudo apachectl -v 啟動apache sudo apachectl start 重啟apache sudo apachectl restart    配置apach

Mac OS X安裝配置Android原始碼開發環境

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

mac OS X Yosemite 安裝 python lxml 和libxml2

2016-05-25 周海漢 2016.5.25 用python做資料分析或爬蟲抓包,離不開高效的lxml。但lxml安裝在mac下卻會失敗。 % pip install lxml Collecting lxml Usi

如何在Mac OS X用命令列快速的調整圖片大小

如果你使用的是Mac,經常需要調整一批照片的大小,實際上有一個內建工具,可以讓你無需開啟任何影象編輯工具就能搞定。這就是所謂的“SIPS”,是命令列的影象處理工具。它非常容易使用,但你需要知道如何在終端上發揮它的優勢。 簡單地說你想要處理的圖片拷貝到一個目錄中的,在終端cd到該目錄,並執行以下命令

Mac OS X 編寫 ASP.NET vNext (二) IDE配置

上一篇中介紹瞭如何在OS X上搭建.Net執行時。不過光有執行時還不夠,還需要有一個好用的IDE,有了IDE的支援,OS X上的開發才稱為可能。 和上篇類似,這裡先列舉出具體步驟,個人可以根據自己的情況選擇略過一些步驟。 1. 安裝 Sublime Text 32. 安裝 Package Control

Mac OS X編寫 ASP.NET vNext(一)KRE環境搭建

最新的asp.net vnext已經可以支援在mac上運行了,當然用的是mono。相比linux來說,mac的安裝略顯繁瑣。對於大部分用Windows開發asp.net的程式設計師來說,初次配置還是很費時的。我這裡列出詳細安裝步驟,方便大家開發的同時,也給自己做個備忘。 要執行.Net程式,需要新的KRE環

蘋果驅動]Mac OS X Snow Lepard的核心功能擴充套件kext大致解析

Kext是Mac OS 的硬體驅動,它存放位置在系統中:      /System/Library/Extensions/ #系統核心級別存放位置,系統自有驅動位置…      /Library/Extensions/  #系統軟體級別存放位置,例如安裝VMware,V