2015-10-19 209 views
9

有誰知道如何運行pip install -U PySide按照這裏的官方網站指令時避免以下錯誤:https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-systemPIP安裝-U PySide錯誤

請注意,我已經做了brew install qt成功。

You are using pip version 7.0.3, however version 7.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting PySide 
    Using cached PySide-1.2.4.tar.gz 
Installing collected packages: PySide 
    Running setup.py install for PySide 
    Complete output from command /Applications/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-0r7hrI-record/install-record.txt --single-version-externally-managed --compile: 
    Removing /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_package 
    running install 
    running build 
    Python architecture is 64bit 
    Inserting path "/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release/bin" to environment 
    ============================== 
    Package version: 1.2.4 
    Build type: Release 
    Build tests: False 
    --- 
    Make path: /usr/bin/make 
    Make generator: Unix Makefiles 
    Make jobs: 
    --- 
    Script directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide 
    Sources directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources 
    Build directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release 
    Install directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release 
    Python site-packages install directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release/lib/python2.7/site-packages 
    --- 
    Python executable: /Applications/anaconda/bin/python 
    Python includes: /Applications/anaconda/include/python2.7 
    Python library: /Applications/anaconda/lib/libpython2.7.dylib 
    Python prefix: /Applications/anaconda 
    Python scripts: /Applications/anaconda/bin 
    --- 
    Qt qmake: /Applications/anaconda/bin/qmake 
    Qt version: 4.8.6 
    Qt bins: /Applications/anaconda/bin 
    Qt plugins: /Applications/anaconda/plugins 
    --- 
    OpenSSL libs: None 
    ============================== 
    Creating build folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release... 
    Creating install folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release... 
    Building module shiboken... 
    Creating module build folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release/shiboken... 
    Configuring module shiboken (/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken)... 
    Running process: /usr/local/bin/cmake -G "Unix Makefiles" -DQT_QMAKE_EXECUTABLE=/Applications/anaconda/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken -DPYTHON_EXECUTABLE=/Applications/anaconda/bin/python -DPYTHON_INCLUDE_DIR=/Applications/anaconda/include/python2.7 -DPYTHON_LIBRARY=/Applications/anaconda/lib/libpython2.7.dylib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DALTERNATIVE_QT_INCLUDE_DIR=/Applications/anaconda/include 
    /usr/local/bin/cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/Applications/anaconda/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken -DPYTHON_EXECUTABLE=/Applications/anaconda/bin/python -DPYTHON_INCLUDE_DIR=/Applications/anaconda/include/python2.7 -DPYTHON_LIBRARY=/Applications/anaconda/lib/libpython2.7.dylib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DALTERNATIVE_QT_INCLUDE_DIR=/Applications/anaconda/include 
    -- The C compiler identification is AppleClang 7.0.0.7000072 
    -- The CXX compiler identification is AppleClang 7.0.0.7000072 
    CMake Error at /usr/local/Cellar/cmake/3.3.0/share/cmake/Modules/Platform/Darwin.cmake:76 (message): 
     CMAKE_OSX_DEPLOYMENT_TARGET is '10.5' but CMAKE_OSX_SYSROOT: 

     "" 

     is not set to a MacOSX SDK with a recognized version. Either set 
     CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to 
     empty. 
    Call Stack (most recent call first): 
     /usr/local/Cellar/cmake/3.3.0/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include) 
     CMakeLists.txt:2 (project) 


    -- Configuring incomplete, errors occurred! 
    See also "/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release/shiboken/CMakeFiles/CMakeOutput.log". 
    error: Error configuring shiboken 

    ---------------------------------------- 
Command "/Applications/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-0r7hrI-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide 

更新(2016年3月16日):

我最近買了我的手,一個完全更新的Mac OS X 10.11(埃爾卡皮坦)。我繼續成功地brew install qt,然後再次嘗試pip install -U PySide(按照這些說明:https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system)。不幸的是,我再次接到了一個錯誤:

Collecting PySide 
    Downloading PySide-1.2.4.tar.gz (9.3MB) 
    100% |████████████████████████████████| 9.3MB 162kB/s 
Installing collected packages: PySide 
    Running setup.py install for PySide ... error 
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-YVPqB6-record/install-record.txt --single-version-externally-managed --compile: 
    Removing /private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/pyside_package 
    running install 
    running build 
    Python architecture is 64bit 
    error: Failed to find cmake. Please specify the path to cmake with --cmake parameter. 

    ---------------------------------------- 
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-YVPqB6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/ 

,因爲我原來的職位它已經很多個月,由upvotes來看,我不是唯一一個有這個問題。因此,我開始懷疑https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system的說明可能已經過時。如果有人真的得到這個工作,請上傳配方。謝謝。

+1

MacOS X二進制文件還沒有發佈的PySide版本1.2.4。你可以在http://pyside.readthedocs.org/en/latest/building/macosx.html這裏創建二進制文件,你可以使用'pip install pyside =='來使用舊​​版本1.2.2的官方二進制文件1.2.2' – rlacko

+0

同樣的錯誤。現在已經在這個問題上掙扎了2個月。 – warship

+3

對此有何更新?我在el capitan – user1387717

回答

3

首先,這是我第一次在計算器回答的東西,所以請有一定的耐心與我..

爲了安裝pyside我已經安裝cmake的,並且我有同樣的問題,您。那麼,我嘗試用自制軟件:

$ brew doctor 

它說,cmake安裝,但沒有鏈接。爲了鏈接它,我不得不用自制運行:

$ brew link cmake 

在那之後,我再次嘗試:

$ pip3.4 install -U PySide 

和它的工作,現在是安裝和它的作品。希望這會有所幫助。

+0

花了將近一年的時間來解決這個問題,但值得等待,歡迎來到堆棧溢出! – warship

0

要在您的系統上安裝二進制Python模塊,您需要使用構建工具正確配置OS X機器。這意味着使用最新的OS X版本和安裝了命令行工具的最新XCode。

事實上,我看到一個部署目標10.5似乎很嚇人,因爲當前版本的OS X是10.11 ......聽起來太過於老舊的SDK。

0

我加入CMake的,是我路上解決的第二個問題:

$> PATH = 「/應用/ CMake.app /內容/箱」: 「$ PATH」

這樣的CMake實際上可以被發現。我仍然被第一個問題難住。事實上,我在處理CMake後得到了第一個問題。

這裏是我的設置:

  • 的Mac OS X(10.10.5)
  • 的Python 2.7.10
  • PIP 8.0.2
  • 的Qt 4.8.6
  • CMake的3.6。 0-rc02
  • Xcode Commad Lines工具已安裝。
2

我嘗試了一切,但無法使用pip。最後,我嘗試用自制軟件:

$ brew install pyside 

它工作正常!

我在Mac OS X 10.11(El Capitan)上。

+0

是的,沒關係。它也適用於我,我只是想提請注意,它不符合pip安裝,正如網站上的指示。 – warship

+4

看起來像它已經遷移到自制boneyard,'brew安裝自制軟件/ boneyard/pyside':'( – mfink