2015-10-19 203 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