Installing pyside with python3 on os x

不想你离开。 提交于 2019-12-03 17:07:43

This has been fixed in Homebrew (see wiki). Installing Pyside with

brew install pyside --with-python3

will install it for both Python 2 and Python 3. For this to work, you may have to uninstall shiboken and pyside first if they were already installed for Python 2.

Maybe in this case not use homebrew, and do a

pip3 install pyside

? Assuming you have brewed python3.

Edit: Does not work. That is probably the reason a homebrew formula exists for it..

It is worth mentioning you can use homebrew with some small modifications

  1. brew edit pyside
  2. Modify which_python to return simply "python3.3" (or whatever version you are using)
  3. Add the CMAKE flag -DUSE_PYTHON3=1
  4. Save and Exit
  5. brew edit shiboken
  6. Modify python_prefix to be python3.3-config --prefix
  7. Modify python_version to be python3.3-config --libs
  8. Modify which_python to return "python3.3"
  9. brew uninstall pyside shiboken
  10. brew install pyside
  11. python3 -c "from PySide.QtGui import *"
  12. Bask in Glory.

Note! This may cause conflicts if pyside is installed for python2 as well. There is active development on this issue for both pyside and pyqt. See https://github.com/mxcl/homebrew/pull/18588

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!