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

Installation error on Mac OS X #10

Closed chetan51 closed 9 years ago

chetan51 commented 9 years ago

After pip install nustudio successfully completes, if I run the command nustudio, I see the following error message:

Traceback (most recent call last):
  File "/usr/local/bin/nustudio", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: scipy

It could be an issue with my environment though...

david-ragazzi commented 9 years ago

It seems that the problem is scipy.. Try this:

brew install scipy

david-ragazzi commented 9 years ago

@chetan51 Some feedback?

david-ragazzi commented 9 years ago

ping...

chetan51 commented 9 years ago

I'm seeing a different issue now:

~ » brew install pyqt
==> Installing dependencies for pyqt: qt, sip
==> Installing pyqt dependency: qt
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.6.mavericks.bottle.5.tar.gz
######################################################################## 100.0%
==> Pouring qt-4.8.6.mavericks.bottle.5.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.

.app bundles were installed.
Run `brew linkapps` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/qt/4.8.6: 2790 files, 119M
==> Installing pyqt dependency: sip
==> Downloading https://downloads.sf.net/project/pyqt/sip/sip-4.16.1/sip-4.16.1.tar.gz
######################################################################## 100.0%
==> python configure.py --deployment-target=10.9 --destdir=/usr/local/Cellar/sip/4.16.1/lib/python2.7/site-packages --bindir=/usr/local/Cellar/sip/4.16.1/bin -
==> make
==> make install
==> make clean
==> Caveats
The sip-dir for Python is /usr/local/share/sip.
If you need Python to find the installed site-packages:
  mkdir -p ~/Library/Python/2.7/lib/python/site-packages
  echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/sip/4.16.1: 9 files, 624K, built in 5 seconds
==> Installing pyqt
==> Downloading https://downloads.sf.net/project/pyqt/PyQt4/PyQt-4.10.4/PyQt-mac-gpl-4.10.4.tar.gz
######################################################################## 100.0%
==> Patching
patching file configure.py
Hunk #1 succeeded at 1891 (offset 5 lines).
Hunk #2 succeeded at 1939 (offset 5 lines).
==> python configure.py --confirm-license --bindir=/usr/local/Cellar/pyqt/4.10.4/bin --destdir=/usr/local/Cellar/pyqt/4.10.4/lib/python2.7/site-packages --sipd
==> python ./configure-ng.py --confirm-license --bindir=/usr/local/Cellar/pyqt/4.10.4/bin --destdir=/usr/local/Cellar/pyqt/4.10.4/lib/python2.7/site-packages -
==> make
==> make install
==> make clean
==> Caveats
Phonon support is broken.
If you need Python to find the installed site-packages:
  mkdir -p ~/Library/Python/2.7/lib/python/site-packages
  echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/pyqt/4.10.4: 63 files, 16M, built in 3.9 minutes
~ » sudo pip install nustudio
Password:
Sorry, try again.
Password:
Downloading/unpacking nustudio
  Downloading nustudio-1.0.2.tar.gz (986kB): 986kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/nustudio/setup.py) egg_info for package nustudio
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/tmp/pip_build_root/nustudio/setup.py", line 23, in <module>
        execfile(os.path.join(repositoryDir, "nustudio", "__init__.py"), {}, properties)
      File "/private/tmp/pip_build_root/nustudio/nustudio/__init__.py", line 3, in <module>
        from PyQt4 import QtGui, QtCore
    ImportError: No module named PyQt4
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/private/tmp/pip_build_root/nustudio/setup.py", line 23, in <module>

    execfile(os.path.join(repositoryDir, "nustudio", "__init__.py"), {}, properties)

  File "/private/tmp/pip_build_root/nustudio/nustudio/__init__.py", line 3, in <module>

    from PyQt4 import QtGui, QtCore

ImportError: No module named PyQt4

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/nustudio
Storing debug log for failure in /Users/Chetan/Library/Logs/pip.log
~ »
david-ragazzi commented 9 years ago

@chetan51 Maybe the solutions presented here may help:

http://stackoverflow.com/questions/16994232/importerror-no-module-named-pyqt4

chetan51 commented 9 years ago

Ah, so I can brew info pyqt, which said:

If you need Python to find the installed site-packages:
  mkdir -p ~/Library/Python/2.7/lib/python/site-packages
  echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth

Once I ran those commands, pip install nustudio worked!