Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed install on Mountain Lion via Homebrew #73

Closed
jlecour opened this issue Sep 5, 2012 · 12 comments
Closed

Failed install on Mountain Lion via Homebrew #73

jlecour opened this issue Sep 5, 2012 · 12 comments
Labels
Milestone

Comments

@jlecour
Copy link

jlecour commented Sep 5, 2012

Hi,

I'm on Mac OS X 10.8.1, with the latest Homebrew and I can't install Glances.

Here is the full output :

→ brew install brew-pip
==> Downloading https://github.com/josh/brew-pip/tarball/v0.1.2
######################################################################## 100,0%
/usr/local/Cellar/brew-pip/0.1.2: 4 files, 16K, built in 2 seconds
~ 
→ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
~ 
→ brew pip Glances
==> pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4

==> Build Environment
HOMEBREW_VERSION: 0.9.3
HEAD: 9a3b9313240b2d5c9a51cb28ae0266a95ef603b6
CPU: dual-core 64-bit penryn
OS X: 10.8.1-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
X11: 2.7.2 in /opt/X11
CC: cc
CXX: c++
LD: cc
MAKEFLAGS: -j2
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: Failed executing: pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4 (.rb:)

This link will help resolve the above errors:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
~ 
→ brew install python
Error: python-2.7.3 already installed
@nicolargo
Copy link
Owner

Another way to install this on OSX if you use Homebrew package manager.

  1. Install Homebrew if you don't have it already
    http://mxcl.github.com/homebrew/
  2. Install the brew-pip package
    brew install brew-pip
  3. Add Homebrew's pip path to your PYTHONPATH environment variable (you probably should add this to some sort of shell initialization file like ~/.bashrc or ~/.zshrc)
    export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
  4. Now install any pip pacakges with Homebrew!
    brew pip Glances

@jlecour
Copy link
Author

jlecour commented Sep 5, 2012

Hi @nicolargo

Thanks for your answer, but your steps are exactly what I've done, as you can see in my initial comment (look at lines beginning with "→ ").

@nicolargo
Copy link
Owner

Sorry ! i did not see the export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages line :(

@sparez
Copy link

sparez commented Sep 5, 2012

Hi,

I confirm the issue is present also on OS X 10.7.4 with exactly the same output:

20:14:22 case@neuromancer:~ > export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
20:14:28 case@neuromancer:~ > brew pip Glances
==> pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4

==> Build Environment
HOMEBREW_VERSION: 0.9.3
HEAD: 9a3b9313240b2d5c9a51cb28ae0266a95ef603b6
CPU: quad-core 64-bit sandybridge
OS X: 10.7.4-x86_64
Xcode: 4.4.1
CLT: 1.0.0.9000000000.1.1249367152
X11: 2.6.4 in /usr/X11
CC: cc
CXX: c++
LD: cc
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: Failed executing: pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4 (.rb:)

This link will help resolve the above errors:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist

Nevertheless I was able to get a running Glances simply invoking pip the same way shown in the above output:

20:14:40 case@neuromancer:~ > pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4
Downloading/unpacking glances==1.4
  Downloading glances-1.4.tar.gz (830Kb): 830Kb downloaded
  Running setup.py egg_info for package glances

    warning: no files found matching 'ChangeLog'
Downloading/unpacking psutil>=0.4.1 (from glances==1.4)
  Downloading psutil-0.6.1.tar.gz (138Kb): 138Kb downloaded
  Running setup.py egg_info for package psutil

Installing collected packages: glances, psutil
  Running setup.py install for glances

    warning: no files found matching 'ChangeLog'
    Installing glances script to /usr/local/share/python
  Running setup.py install for psutil
    building '_psutil_osx' extension
    /usr/bin/llvm-gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -O3 -w -pipe -march=core2 -msse4 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/_psutil_osx.c -o build/temp.macosx-10.5-intel-2.7/psutil/_psutil_osx.o
    /usr/bin/llvm-gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -O3 -w -pipe -march=core2 -msse4 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/_psutil_common.c -o build/temp.macosx-10.5-intel-2.7/psutil/_psutil_common.o
    /usr/bin/llvm-gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -O3 -w -pipe -march=core2 -msse4 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/arch/osx/process_info.c -o build/temp.macosx-10.5-intel-2.7/psutil/arch/osx/process_info.o
    /usr/bin/llvm-gcc -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot / -L/usr/local/Cellar/readline/6.2.2/lib build/temp.macosx-10.5-intel-2.7/psutil/_psutil_osx.o build/temp.macosx-10.5-intel-2.7/psutil/_psutil_common.o build/temp.macosx-10.5-intel-2.7/psutil/arch/osx/process_info.o -o build/lib.macosx-10.5-intel-2.7/_psutil_osx.so -framework CoreFoundation -framework IOKit
    building '_psutil_posix' extension
    /usr/bin/llvm-gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -O3 -w -pipe -march=core2 -msse4 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.macosx-10.5-intel-2.7/psutil/_psutil_posix.o
    /usr/bin/llvm-gcc -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot / -L/usr/local/Cellar/readline/6.2.2/lib build/temp.macosx-10.5-intel-2.7/psutil/_psutil_posix.o -o build/lib.macosx-10.5-intel-2.7/_psutil_posix.so

Successfully installed glances psutil
Cleaning up...

When I tried running it at first though, it was still throwing an error:

20:15:59 case@neuromancer:~ > glances 
Traceback (most recent call last):
  File "/usr/local/share/python/glances", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 2711, in <module>
    working_set.require(__requires__)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 690, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Glances==1.4

But simply running brew link glances fixed the whole thing.

20:16:55 case@neuromancer:~ > brew link glances
Linking /usr/local/Cellar/glances/1.4... 52 symlinks created
20:17:03 case@neuromancer:~ > 

Sure the brew pip Glances procedure still needs a fix but as a temporary workaround the above should work.

@nicolargo
Copy link
Owner

I take the action to change the documentation for the next release.

@bcomnes
Copy link

bcomnes commented Sep 25, 2012

I am having the same issue on 10.6 and 10.7 as well. pip install glances used to install it just fine when using the homebrew python environment.

@nicolargo
Copy link
Owner

Update the documentation for 1.5 is done

@bcomnes
Copy link

bcomnes commented Nov 3, 2012

brew pip Glances still seems to have this issue. Not sure where the problem lies though. Installing through pip works fine, even on my 32 bit macbook pro.

@roryk
Copy link

roryk commented Nov 25, 2012

I think brew-pip is what is broken?

@jab
Copy link

jab commented Nov 26, 2012

josh/brew-pip#13

@bcomnes
Copy link

bcomnes commented Nov 28, 2012

I think its brew-pip as well. The problem does not seem to be resolved either. Not sure why my issue was close over there.

@martineklund
Copy link

Hi!

Encountered the same errors as @sparez i.e

20:15:59 case@neuromancer:~ > glances 
Traceback (most recent call last):
  File "/usr/local/share/python/glances", line 5, in 
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 2711, in 
    working_set.require(__requires__)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 690, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.26-py2.7.egg/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Glances==1.4

which I solved by running

brew link glances 

I then ran glances and it worked just fine. But when exiting and re-running glances I got the following output

212-25-134-84:~ ibu$ glances
Traceback (most recent call last):
  File "/usr/local/bin/glances", line 5, in 
    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 
    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: Glances==1.6

I tried relinking by running

brew unlink glances && brew link glances

which resulted in the same output as before.

Any ideas?

Edit: Perhaps I should add that I tried the proposed way first, i.e

brew pip Glances
which resulted in
Error: Failed executing: pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X (.rb:)
etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants