编程语言
首页 > 编程语言> > Ipython qtconsole找不到安装的PyQt(Homebrew)

Ipython qtconsole找不到安装的PyQt(Homebrew)

作者:互联网

我一直在尝试使用qtconsole安装Python 3.3.2 ipython 1.0,全部通过Homebrew.这需要我下载并安装PyQt,这是我成功完成的.但是,当我尝试运行$ipython3 qtconsole时,它无法加载PyQt4 – 它说它没有安装.我认为这个问题可能与添加正确的PYTHONPATH有关 – 在安装PyQt之后我收到了一些警告:

Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!
 PYTHONPATH is currently: "/usr/local/lib/python2.7/site-packages"
 You should `unset PYTHONPATH` to fix this.

For non-homebrew python (2.x), you need to amend your PYTHONPATH like so:
 export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

另外,我无法在我的.profile中看到它强调的PATH.

我按照这个指南:
http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/

我尝试将几种不同的PYTHONPATH添加到.profile中,但似乎都没有效果.

有任何建议或解决方法吗?

更新:
我将PyQt放在/usr/local/lib/python2.7/site-packages中,但是我需要在/python3.3/site-packages中安装它.我的PATH是/usr/local/bin,并安装了Homebrew python3.3中除了PyQt之外的所有其他内容.我怎么得到它?

解决方法:

您应该使用python3支持构建PyQt.所以:

brew install pyqt --with-python3

标签:python,homebrew,pyqt,python-3-3,qtconsole
来源: https://codeday.me/bug/20190703/1368515.html