Run PyF on Ubuntu?

155 views
Skip to first unread message

project2501

unread,
Aug 11, 2011, 10:09:45 AM8/11/11
to PyF Framework Users
Hi,
I get through the easy_install pyf[fullstack] successfull on ubuntu
10.10 desktop.
However, when I try to run the service, it gives this:

(pyfenv)darren@database:~/pyfenv$ pyfservices-setup pyfservices.ini
Traceback (most recent call last):
File "/home/darren/pyfenv/bin/pyfservices-setup", line 5, in
<module>
from pkg_resources import load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2603, in
<module>
File "build/bdist.linux-i686/egg/pkg_resources.py", line 666, in
require
File "build/bdist.linux-i686/egg/pkg_resources.py", line 565, in
resolve
pkg_resources.DistributionNotFound: Babel>=0.9.4


Babel IS installed:


Best match: Babel 0.9.6
Downloading http://pypi.python.org/packages/2.6/B/Babel/Babel-0.9.6-py2.6.egg#md5=e66698fb97c8dc0a7c6b7b86c91d62be
Processing Babel-0.9.6-py2.6.egg
creating /usr/local/lib/python2.6/dist-packages/Babel-0.9.6-py2.6.egg
Extracting Babel-0.9.6-py2.6.egg to /usr/local/lib/python2.6/dist-
packages
Adding Babel 0.9.6 to easy-install.pth file
Installing pybabel script to /usr/local/bin

Installed /usr/local/lib/python2.6/dist-packages/Babel-0.9.6-py2.6.egg
Finished processing dependencies for pyf[fullstack]


Any ideas?

thanks.

Florent Aide

unread,
Aug 12, 2011, 9:52:45 AM8/12/11
to pyf-...@googlegroups.com
Hi Dareng (that's your name?),

Seems like babel is installed outside the virtualenv you are trying to
launch pyf in.
Could you check inside the virtualenv (pyfenv it seems on your
machine) to make sure babel is indeed install inside it.

Cheers,
Florent

Jose Luis

unread,
Aug 16, 2011, 10:13:10 AM8/16/11
to PyF Framework Users
Hi,

I got troubles in Ubuntu too.

When I run pyfservices-setup pyfservices.ini the result is:

(pyfenv)jose@laptop:~/pyfenv$ pyfservices-setup: command not found

Any suggestions?

Thanking you in advance
jls
> > Downloadinghttp://pypi.python.org/packages/2.6/B/Babel/Babel-0.9.6-py2.6.egg#md5...

Florent Aide

unread,
Aug 16, 2011, 4:00:59 PM8/16/11
to pyf-...@googlegroups.com
Hi Jose,

If the command does not exist then the install did not go well. Could
you relaunch the install phase (inside the same virtualenv, ie:
pyfenv):

easy_install -UZ pyf[fullstack]

and see if there is no error?

Regards,
Florent

John Hall

unread,
Aug 16, 2011, 4:03:59 PM8/16/11
to pyf-...@googlegroups.com
Before installing PyF first read about then install virtualenv and pip.
(search google & ask people on #python on freenode irc for links to the how-tos. I believe you will find these referenced in the #python irc channel faq.)
I tried PyF on Unbutu as well. PyF does not work with the environment the system requires. To avoid breaking your system and to keep projects totally separate you create a virtual environment with a separate Python interpreter and separate site-packages directory. This will allow you to have an isolated set of libraries for PyF. 
Virtualenv and virutalenv wrapper automate the setup of these isolated environments and to some degree help you save some space by using links to large files.  pip will help you populate your clean environment with just Python and the standard libs with the other libs that are required.
pip is a newer tool to install and download python packages from pypi. It is an improvement over easy_install. One of the best things second only to some integration with virtualenv is SEARCH !
   
After installing pip and creating a virualenv for PyF try:
pip search "PyF "

The quotes and space are important.

I can't remember what the wisdom is on the site. I suggest that when configuring PyF for development you want to use your user to set up the virualenv, not root. When configuring PyF as a service you want to use the user that you will use to launch the service to set up the virtualenv, not root or your own user. Anyway...follow the directions on the PyF website and list after you thoroughly understand virtualenv.

General Guidlines for installing Python software on Ubuntu.
For the stable software you are using on your system that is part of the distribution use your system's package manger to manage all your packages including Python packages.
Ubuntu ( and other Linux distributions in general) package together versions of libs that support programs that are included for use, along with settings and other files. This is the value the distributions add to Linux.

For development and Python packages outside the distribution packages create a virutalenv and then use pip to install the required package, get them from source control, or install them from a downloaded tarball into your home dir or /usr/local.

Florent Aide

unread,
Aug 16, 2011, 4:09:43 PM8/16/11
to pyf-...@googlegroups.com
On Tue, Aug 16, 2011 at 10:03 PM, John Hall <johnh...@gmail.com> wrote:
> Before installing PyF first read about then install virtualenv and pip.

Jose is already using virtualenv from what we can see in his previous
email. Since the virtualenv is named after what can be found in the
docs we can safly suppose he followed them:

http://pyfproject.org/en/getting-started

PyPi got some problems today and this may have broken the download phase.

Cheers,
Florent

John Hall

unread,
Aug 16, 2011, 4:11:17 PM8/16/11
to pyf-...@googlegroups.com
Thank you Florent,
I now see that darreng5150 had a virtual env too... I guess I don't understand yet what is not working. It's not the same thing that happened to me and now I am mainly using Fedora 15. Sorry for the extra mail.



Florent Aide

unread,
Aug 16, 2011, 4:15:27 PM8/16/11
to pyf-...@googlegroups.com
No problem. Nice to see people using pyf services and participating on
the mailing list :)
Reply all
Reply to author
Forward
0 new messages