2015-10-19 16 views
9

Qualcuno sa come evitare il seguente errore durante l'esecuzione pip install -U PySide secondo le istruzioni del sito web ufficiale qui: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-systempip install errore U PySide

Nota che ho già fatto con successo 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 

UPDATE (2016/03/16):

Recentemente ho avuto le mie mani su una completamente aggiornata di Mac OS X 10.11 (El Capitan). Ho proceduto con successo a brew install qt e quindi ho provato nuovamente pip install -U PySide (come da queste istruzioni: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system). Purtroppo, ancora una volta ricevuto un errore:

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/ 

Sono passati molti mesi da quando il mio post originale e, a giudicare dai upvotes, io non sono l'unico ad avere questo problema. Come tale, sto iniziando a sospettare che forse le istruzioni per https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system sono semplicemente obsolete. Se qualcuno lo fa funzionare, per favore carica la ricetta. Grazie.

+1

binari MacOS X in cui non è ancora stato rilasciato per PySide versione 1.2.4. Puoi costruire i binari seguendo le tue istruzioni qui http://pyside.readthedocs.org/en/latest/building/macosx.html, oppure puoi usare i binari ufficiali dalla precedente versione 1.2.2, usando 'pip install pyside == 1.2.2 ' – rlacko

+0

Ancora lo stesso errore. Sono stato alle prese con questa domanda più di 2 mesi. – warship

+3

Qualche aggiornamento su questo? Ho lo stesso errore su el capitan – user1387717

risposta

3

Prima di tutto, questa è la prima volta che sto rispondendo qualcosa in StackOverflow, quindi si prega di avere un po 'di pazienza con me ..

avevo installato CMake per installare PySide, e ho avuto lo stesso problema tu.Quindi, ho provato con homebrew:

$ brew doctor 

Ha affermato che cmake è stato installato ma non collegato. Al fine di collegarlo, ho dovuto correre con homebrew:

$ brew link cmake 

Dopo di che, ho provato di nuovo:

$ pip3.4 install -U PySide 

e ha funzionato, si è ora installato e funziona .. Spero che questo aiuti .

+0

Ci è voluto quasi un anno per capirlo, ma vale la pena aspettare.Benvenuto allo Stack Overflow! Spero di vederti in giro. – warship

0

Per installare i moduli Python binari sul sistema è necessario configurare correttamente la macchina OS X con gli strumenti di compilazione. Ciò significa che utilizzare una versione recente di OS X e un XCode recente con gli strumenti della riga di comando installati.

Il fatto che io veda un obiettivo di distribuzione 10.5 mi sembra spaventoso poiché la versione corrente di OS X è 10.11 ... sembra un SDK troppo vecchio.

0

ho risolto il secondo problema aggiungendo CMake sul mio cammino:

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

In questo modo può effettivamente CMake Essere trovato. Sono ancora sconcertato dal primo numero. In effetti, ottengo il primo problema dopo aver interagito con CMake.

Qui è la mia messa a punto:

  • Mac OS X (10.10.5)
  • Python 2.7.10
  • pip 8.0.2
  • Qt 4.8.6
  • CMake 3.6. 0-rc02
  • Gli strumenti Xcode Commad Lines sono stati installati.
2

Ho provato tutto ma non sono riuscito a farlo con pip. Finalmente ho provato con homebrew:

$ brew install pyside 

e funziona benissimo!

Sono su Mac OS X 10.11 (El Capitan).

+0

Sì, va bene. Funziona anche per me, volevo solo attirare l'attenzione sul fatto che non funziona con l'installazione di pip, come indicato sul sito web. – warship

+4

sembra essere stato migrato nell'housebrew boneyard, 'brew install homebrew/boneyard/pyside': '( – mfink