13

Does anyone know how to avoid the following error when running pip install -U PySide as per the official website instructions here: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system

Note that I have already done brew install qt successfully.

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

UPDATE (3-16-2016):

I recently got my hands on a fully updated Mac OS X 10.11 (El Capitan). I proceeded to successfully brew install qt and then tried pip install -U PySide once again (as per these instructions: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system). Unfortunately, I once again received an error:

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/

It's been many months since my original post and judging by the upvotes, I'm not the only one with this problem. As such, I'm starting to suspect that perhaps the instructions to https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system are simply outdated. If anyone actually gets this to work, please upload the recipe. Thank you.

warship
  • 2,505
  • 6
  • 30
  • 58
  • 1
    MacOS X binaries where not released yet for PySide version 1.2.4. You can build the binaries your self folowing instruction here http://pyside.readthedocs.org/en/latest/building/macosx.html, or you can use official binaries from previous version 1.2.2, using 'pip install pyside==1.2.2' – rlacko Oct 19 '15 at 10:43
  • Still same error. Been struggling with this question over 2 months now. – warship Dec 23 '15 at 01:29
  • 3
    Any update on this? I have the same error on el capitan – user1387717 Feb 02 '16 at 18:23
  • I'm actually still waiting on a response to this as well. I'm very surprised that it still hasn't been answered. I recommend that you post a similar question of your own, and link me to it (if possible). – warship Feb 02 '16 at 22:07
  • @user1387717 El Capitan update posted above... – warship Mar 16 '16 at 22:18

5 Answers5

3

I tried everything but couldn't make it with pip. Finally I tried with homebrew:

$ brew install pyside

and it works fine!

I'm on Mac OS X 10.11 (El Capitan).

  • Yeah, that's fine. It works for me too, I just wanted to draw attention to the fact that it doesn't work with the pip install, as instructed on the website. – warship Aug 21 '16 at 04:08
  • 5
    looks like its been migrated to the homebrew boneyard, `brew install homebrew/boneyard/pyside` :'( – mfink Nov 03 '16 at 15:18
3

First of all, this is the first time I am answering something in stackoverflow, so please have some patience with me..

I had installed cmake in order to install pyside, and I had the same problem as you. So then, I tried with homebrew:

$ brew doctor

It said that cmake was installed but not linked. In order to link it, I had to run with homebrew:

$ brew link cmake

After that, I tried again:

$ pip3.4 install -U PySide

And it worked, it is now installed and it works.. Hope this helps.

Contrapunto
  • 142
  • 1
  • 9
  • Took almost a year to figure this out, but worth the wait. Welcome to Stack Overflow! Hope to see you around. – warship Oct 12 '16 at 04:44
1

As of June 2018 on MacOS High Sierra, you'd still encounter this issue.

  • Make sure to install qt 4.8.7, brew install qt would install qt5 by default which is not compatible with PySide, if you did install qt5, uninstall it and then install qt4.

    brew tap cartr/qt4

    brew install qt@4

  • Create an alias for qmake in your bashrc, if qmake is not detected alias qmake="/usr/local/Cellar/qt@4/4.8.7_5/bin/qmake"

  • pip install pyside should work now, it took around 30 minutes for it to complete. So, be patient.

alam
  • 117
  • 1
  • 11
0

To install binary Python modules on your system you need to properly configure your OS X machine with the build tools. This means that use a recent OS X version AND a recent XCode with command line tools installed.

The fact that I see a deployment target 10.5 seems scare to me as the current version of OS X is 10.11 ... sounds as a far too old SDK.

sorin
  • 137,198
  • 150
  • 472
  • 707
0

I solved the second issue by adding CMake to my path:

$> PATH="/Applications/CMake.app/Contents/bin":"$PATH"

That way CMake can actually be found. I am still stumped by the first issue. In fact, I get the first issue after dealing with CMake.

Here is my setup:

  • 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 tools have been installed.
Christopher Spears
  • 1,065
  • 15
  • 31