我想在OS X Mavericks上的virtualenv上安装pyside,这样我就可以保持文件清洁。但我无法安装它,我得到了错误。
我已经安装了Xcode 5.1.1(现在最新)和命令行工具。我已经安装了自制软件。
我有一个自制的python和qt(4)。我知道我可以brew install pyside
但我不想这样做。我只想要virtualenv中的所有项目级别的东西。
以下是我的日志(我正在使用zsh和oh-my-zsh):
➜ ~ brew install python qt
# ...
# everything is ok
➜ ~ pip install virtualenv
# ...
# everything is ok
➜ ~
➜ ~ brew list
brew-cask gdbm isl libxml2 pcre readline
cairo gettext jpeg libyaml pixman sqlite
cloog gfortran libffi mpfr pkg-config swig
cmake glib libmpc node python tree
fontconfig gmp libpng openssl qt wget
freetype htop-osx libtiff p7zip r
➜ ~
➜ ~ virtualenv venv
New python executable in venv/bin/python2.7
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
➜ ~
➜ ~ source venv/bin/activate
(venv)➜ ~ pip install pyside
Downloading/unpacking pyside
Real name of requirement pyside is PySide
Downloading PySide-1.2.1.tar.gz (9.3MB): 9.3MB downloaded
Running setup.py (path:/Users/auser/venv/build/pyside/setup.py) egg_info for package pyside
# ...
# wait for it
# ...
1 warning generated.
[ 70%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/sbkconverter.cpp.o
In file included from /Users/auser/venv/build/pyside/sources/shiboken/libshiboken/sbkconverter.cpp:26:
/Users/auser/venv/build/pyside/sources/shiboken/ext/sparsehash/google/dense_hash_map:97:10: fatal error: 'tr1/functional' file not found
#include HASH_FUN_H // defined in config.h
^
/Users/auser/venv/build/pyside/sources/shiboken/ext/sparsehash/google/sparsehash/sparseconfig.h:18:24: note: expanded from macro 'HASH_FUN_H'
#define HASH_FUN_H <tr1/functional>
^
1 error generated.
make[2]: *** [libshiboken/CMakeFiles/libshiboken.dir/sbkconverter.cpp.o] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken
----------------------------------------
Cleaning up...
Command /Users/auser/venv/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/auser/venv/build/pyside/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/t4/pqnck28j69z57hbgp74dzwg40000gn/T/pip-Scd8Bi-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/auser/venv/bin/../include/site/python2.7 failed with error code 1 in /Users/auser/venv/build/pyside
Storing debug log for failure in /Users/auser/.pip/pip.log
(venv)➜ ~
我用谷歌搜索了它,但我找不到任何有用的想法。我该如何解决?