Newbie: installation difficulties [webapp2 / babel]

B

BobAalsma

Hi,

I'm following webapp2 documentation (release 2.1).

I made a mistake in following the text.
I typed "pip install babel" and this led to errors in the installation.
As that user is not in sudo list, I changed users, typed "sudo pip install babel" and everything seemed right.

Further on, the manual says "$ pybabel ...." and when I use that command, the response is "-bash: pybabel: command not found" (in both user environments).

I'd like to solve this and learn at the same time ;)

I'm on OS X 10.8.5, python 2.7.5.

I found a "babel" in /Library/Python/2.7/site-packages.
I found a "babel" in the response to "python -c "help('modules')" | grep babel".
From which I conclude that babel is on the machine and is known to python.

However, I gather from the webapp2 documentation that babel should also be known to the shell.
I don't yet know how to check this, nor how to repair.

find /usr -name '*babel*'
and
find /bin -name '*babel*'
return no values, but
find /Library -name '*babel*'
does (as expected).

I've tried to find similar situations in documentation, forums, Google but found nothing helpful.
 
J

Joel Goldstick

Hi,

I'm following webapp2 documentation (release 2.1).

I made a mistake in following the text.
I typed "pip install babel" and this led to errors in the installation.
As that user is not in sudo list, I changed users, typed "sudo pip install babel" and everything seemed right.

Further on, the manual says "$ pybabel ...." and when I use that command, the response is "-bash: pybabel: command not found" (in both user environments).

I'd like to solve this and learn at the same time ;)

I'm on OS X 10.8.5, python 2.7.5.

I found a "babel" in /Library/Python/2.7/site-packages.
I found a "babel" in the response to "python -c "help('modules')" | grep babel".
From which I conclude that babel is on the machine and is known to python.

However, I gather from the webapp2 documentation that babel should also be known to the shell.
I don't yet know how to check this, nor how to repair.

find /usr -name '*babel*'
and
find /bin -name '*babel*'
return no values, but
find /Library -name '*babel*'
does (as expected).

I've tried to find similar situations in documentation, forums, Google but found nothing helpful.

If you can run $python babel then I think you need to set babel to be
executable to run it without invoking python first.
 
B

BobAalsma

Well Joel, umm, I'm not sure if I understand you correctly.

$ python babel
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'babel': [Errno 2] No such file or directory

And


$ python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Does this help?

Bob
 
J

Joel Goldstick

Well Joel, umm, I'm not sure if I understand you correctly.

$ python babel
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'babel': [Errno 2] No such file or directory

And


$ python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Does this help?

Bob

Bob, I'm not a pro at getting python stuff to run on Apple, but you
might learn something here:
http://docs.python.org/2/using/mac.html#using-python-on-a-macintosh
From the looks of it, babel doesn't seem to be in a directory where
the mac looks for executables. You may want to cd yourself over to
where babel is and try to run it. If that works, you have to figure
out how to get babel in your executable path. I can't help you there.
 
C

Chris Angelico

Well Joel, umm, I'm not sure if I understand you correctly.

$ python babel
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'babel': [Errno 2] No such file or directory

If the file's called babel.py, you have to invoke it that way - Python
won't add an implicit file extension. Not sure if that helps your
problem or not - I don't know babel, nor Mac OS. Try:

$ python babel.py

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top