htm-community / nupic.studio

NuPIC Studio is a powerful all­-in-­one tool that allows users create a HTM neural network from scratch, train it, collect statistics, and share it among the members of the community.
GNU General Public License v2.0
94 stars 29 forks source link

Startup error on OS X: cannot import name QtGui #3

Closed rhyolight closed 9 years ago

rhyolight commented 9 years ago
› pip install nustudio
Downloading/unpacking nustudio
  Using download cache from /Users/mtaylor/Library/Caches/pip-downloads/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fn%2Fnustudio%2Fnustudio-1.0.0.tar.gz
  Running setup.py (path:/private/var/folders/c1/fc9tt93s2p5b9d3wp185qxwc0000gn/T/pip_build_mtaylor/nustudio/setup.py) egg_info for package nustudio

Requirement already satisfied (use --upgrade to upgrade): PyOpenGL in /usr/local/lib/python2.7/site-packages (from nustudio)
Requirement already satisfied (use --upgrade to upgrade): PyOpenGL-accelerate in /usr/local/lib/python2.7/site-packages (from nustudio)
Downloading/unpacking PyQtGraph (from nustudio)
  Using download cache from /Users/mtaylor/Library/Caches/pip-downloads/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fp%2Fpyqtgraph%2Fpyqtgraph-0.9.8.tar.gz
  Running setup.py (path:/private/var/folders/c1/fc9tt93s2p5b9d3wp185qxwc0000gn/T/pip_build_mtaylor/PyQtGraph/setup.py) egg_info for package PyQtGraph

Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python2.7/site-packages (from PyQtGraph->nustudio)
Requirement already satisfied (use --upgrade to upgrade): scipy in /usr/local/lib/python2.7/site-packages (from PyQtGraph->nustudio)
Installing collected packages: nustudio, PyQtGraph
  Running setup.py install for nustudio

    Installing nustudio script to /usr/local/bin
  Running setup.py install for PyQtGraph

Successfully installed nustudio PyQtGraph
Cleaning up...
› nustudio
Traceback (most recent call last):
  File "/usr/local/bin/nustudio", line 9, in <module>
    load_entry_point('nustudio==1.0.0', 'gui_scripts', 'nustudio')()
  File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2476, in load_entry_point
    try:
  File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2190, in load
    except AttributeError:
  File "/usr/local/lib/python2.7/site-packages/nustudio/program.py", line 4, in <module>
    from PyQt4 import QtGui, QtCore
ImportError: cannot import name QtGui

Do I still need to manually install PyQt4?

rhyolight commented 9 years ago

After running brew install pyqt, this problem went away.

david-ragazzi commented 9 years ago

:beers:

rhyolight commented 9 years ago

@DavidRagazzi You should probably update the README with this dependency.

david-ragazzi commented 9 years ago

https://github.com/DavidRagazzi/nupic.studio/commit/e5f26695950c22b3eb8308cf4b0d3a6448a39140

rhyolight commented 9 years ago

:+1:

syl20bnr commented 9 years ago

Same issue here but PyQt formula does not build on Yosemite for now. Several tickets are opened for PyQt to support Yosemite, will try again when the corresponding patches are available.

@DavidRagazzi You should mention explicitly brew install PyQt in the readme.

david-ragazzi commented 9 years ago

@DavidRagazzi You should mention explicitly brew install PyQt in the readme.

The problem is that brew is specific to OS X, apt-get to Debian-like os, etc.. I think we should have a wiki with these particular installation tips..

rhyolight commented 9 years ago

If README is updated with brew install pyqt, this can be closed.

david-ragazzi commented 9 years ago

Look at this: https://github.com/DavidRagazzi/nupic.studio/blob/master/README.md