RapidSMS setup errors (Mac / Ubuntu)

185 views
Skip to first unread message

Solomon Adebayo

unread,
Sep 11, 2010, 8:19:06 AM9/11/10
to rapidsms
Hi community,

It's been a while off RapidSMS.

The errors below were thrown at me while;

1/  Attempting to setup the new rapidsms using the doc at http://docs.rapidsms.org/DebianBased (Platform is Ubuntu 904, Jaunty);

============================
$ sudo apt-get install python-pip
....
....
....
E: Couldn't find package python-pip


2/  Attempting to create a RapidSMS project (on a Mac OS X 10.5 Platform) using docs at http://docs.rapidsms.org/InstallingOnMacOSX;

=====================================
(rapidsms_dev)...$ sudo rapidsms-admin.py startproject myproject
...
Traceback (most recent call last):
 File "/Users/solomonadebayo/rapidsms_dev/bin/rapidsms-admin.py", line 26, in <module>
   management.execute_from_command_line()
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
   utility.execute()
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/django/core/management/__init__.py", line 379, in execute
   self.fetch_command(subcommand).run_from_argv(self.argv)
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/django/core/management/base.py", line 191, in run_from_argv
   self.execute(*args, **options.__dict__)
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/django/core/management/base.py", line 218, in execute
   output = self.handle(*args, **options)
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/django/core/management/base.py", line 318, in handle
   label_output = self.handle_label(label, **options)
 File "/Users/solomonadebayo/rapidsms_dev/lib/python2.5/site-packages/rapidsms/management/commands/startproject.py", line 31, in handle_label
   shutil.copytree(src_dir, project_name, ignore=shutil.ignore_patterns('*.pyc'))
AttributeError: 'module' object has no attribute 'ignore_patterns'



Can someone pls have a look to assist resolve ?

I was however able to git-clone rapidsms/rapidsms.git without errors on both platforms.


Thanks,
Solo.

ousmane ndiaye

unread,
Sep 11, 2010, 11:10:18 AM9/11/10
to rapi...@googlegroups.com
Hi!
for the python-pip try to download the tar.gz package here http://pypi.python.org/pypi/pip and install it

2010/9/11 Solomon Adebayo <solom...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "rapidsms" group.
To post to this group, send email to rapi...@googlegroups.com.
To unsubscribe from this group, send email to rapidsms+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rapidsms?hl=en.

Sanjay Bhangar

unread,
Sep 12, 2010, 3:18:54 PM9/12/10
to rapi...@googlegroups.com
On Sat, Sep 11, 2010 at 8:40 PM, ousmane ndiaye <usman...@gmail.com> wrote:
> Hi!
> for the python-pip try to download the tar.gz package
> here http://pypi.python.org/pypi/pip and install it
>
or:
sudo apt-get install python-setuptools
sudo easy_install pip

should install pip

hth,
Sanjay

kieranSharpeySchafer

unread,
Sep 13, 2010, 3:41:40 AM9/13/10
to rapidsms
Hi Guys

> > for the python-pip try to download the tar.gz package
> > here http://pypi.python.org/pypi/pip and install it

I've also had this problem when following http://docs.rapidsms.org/InstallingOnMacOSX,
and I don't think its a problem with pip as I got past steps 1 & 2
(install virtualenv, pip and rapidsms) with no issues.

At step 3 however ("$ rapidsms-admin.py startproject myproject") it
fails with the stack trace posted by Solomon, going back to:

File "/Users/ksharpey/rapidsms_dev/lib/python2.5/site-packages/
rapidsms/management/commands/startproject.py", line 31, in
handle_label shutil.copytree(src_dir, project_name,
ignore=shutil.ignore_patterns('*.pyc'))
AttributeError: 'module' object has no attribute 'ignore_patterns'

Is there a command line argument we're not using perhaps?

All the best,
Kieran

Evan Wheeler

unread,
Sep 13, 2010, 11:46:26 AM9/13/10
to rapi...@googlegroups.com

I can't replicate this error. Are you sure your virtualenv is active?
You should see the name of your virtual environment in parenthesis in
front of your bash prompt.

Cheers,
Evan

Solomon Adebayo

unread,
Sep 13, 2010, 12:13:01 PM9/13/10
to rapi...@googlegroups.com
Thanks Sanjay. Your command lines worked for me !

--
You received this message because you are subscribed to the Google Groups "rapidsms" group.
To post to this group, send email to rapi...@googlegroups.com.
To unsubscribe from this group, send email to rapidsms+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rapidsms?hl=en.




--
SAP BASIS/Netweaver Consultant
nuObjects Technology services

Cell: +2348034188983
E: sol...@nuobjects.com
W: http://www.nuobjects.com
B:http://www.solomonadebayo.com

Solomon Adebayo

unread,
Sep 13, 2010, 12:18:46 PM9/13/10
to rapi...@googlegroups.com
Thanks Sanjay. Your command lines worked for me !

However, the following was experienced at step 3: Create a new project (Ubuntu 904, Jaunty);

(rapidsms_dev)soloz@ubuntu:~$ sudo rapidsms-admin.py startproject myproject

Traceback (most recent call last):
  File "/usr/local/bin/rapidsms-admin.py", line 4, in <module>
    import pkg_resources
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: django



Thanks for further assistance.

regards,
Solo.

On Sun, Sep 12, 2010 at 9:18 PM, Sanjay Bhangar <sanjay...@gmail.com> wrote:

Solomon Adebayo

unread,
Sep 13, 2010, 12:22:19 PM9/13/10
to rapi...@googlegroups.com
Hi Evan, comments inlined below.

Yes, virtualenv is activated as in documentation. VEnvironment also appears in parenthesis as indicated in error report.
Thanks,
Solo.

Cheers,
Evan

Sanjay Bhangar

unread,
Sep 13, 2010, 12:30:12 PM9/13/10
to rapi...@googlegroups.com
On Mon, Sep 13, 2010 at 9:48 PM, Solomon Adebayo <solom...@gmail.com> wrote:
> Thanks Sanjay. Your command lines worked for me !
>
> However, the following was experienced at step 3: Create a new project
> (Ubuntu 904, Jaunty);
>
> (rapidsms_dev)soloz@ubuntu:~$ sudo rapidsms-admin.py startproject myproject
> Traceback (most recent call last):
>   File "/usr/local/bin/rapidsms-admin.py", line 4, in <module>
>     import pkg_resources
>   File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2562, in
> <module>
>     working_set.require(__requires__)
>   File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 626, in
> require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 524, in
> resolve
>     raise DistributionNotFound(req)  # XXX put more info here
> pkg_resources.DistributionNotFound: django
>

Have not done a rapidsms install in some time, but looks like you
don't have django installed?
Inside the virtualenv:
pip install django

also -- not sure why you're running the startproject command as sudo?
If you're in a virtualenv in your home directory or so, you shouldn't
need to sudo that command, in fact, I would think it is, in most
cases, a bad idea to sudo that command.

best of luck,
Sanjay

Tim Akinbo

unread,
Sep 13, 2010, 1:46:56 PM9/13/10
to rapi...@googlegroups.com
Hi Solo,

Due to the fact that your virtualenv is under the working environment
of the current user, using sudo is likely to give problems. Instead of

$ sudo rapidsms-admin.py startproject projectname

use:

$ rapidsms-admin.py startproject projectname

I suspect this to be the case and because I'm not using a Mac, I
cannot be certain. Do provide feedback on the outcome.

> --
> You received this message because you are subscribed to the Google Groups
> "rapidsms" group.
> To post to this group, send email to rapi...@googlegroups.com.
> To unsubscribe from this group, send email to
> rapidsms+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rapidsms?hl=en.
>
>


--
Tim Akinbo

Solomon Adebayo

unread,
Sep 13, 2010, 1:48:06 PM9/13/10
to rapi...@googlegroups.com
Thanks again Sanjay.
It worked now. I wonder. Whereas "$ pip install rapidsms" installed rapdism & other dependancies/packages in Mac OS X environment, resources/dependancies are installed separately with $pip install <package> on Ubuntu 904.

Install documentation may need updating as the variations according to this installation experience hasnt been captured on the docs website.

So, I've been able to resolve Ubuntu install with doc,  can someone still along with me have a look into issue still with Mac OS X Install;
At Step (rapidsms_dev)....~$ rapidsms-admin.py startproject myproject


Thanks everyone.

Cheers,
Solo.
Sanjay

Solomon Adebayo

unread,
Sep 13, 2010, 2:05:59 PM9/13/10
to rapi...@googlegroups.com
Hi Tim,

I used :
$ rapidsms-admin.py startproject projectname to start with, but only tried :
$ sudo rapidsms-admin.py startproject projectname in case error was related to permissions, but that's not the case.
 
As now I still have same error earlier reported, with :
$ rapidsms-admin.py startproject projectname


While I also check/retrace the installation, thanks in advance for further quick assists.


Cheers,
Solo.

kieranSharpeySchafer

unread,
Sep 14, 2010, 4:12:39 AM9/14/10
to rapidsms
Hi Solomon and All,

Ev, thanks for updating wiki - the pip rapidsms install now works, but
now I'm at exactly the same point as Solomon.

> As now I still have same error earlier reported, with :
> *$ rapidsms-admin.py startproject projectname

Which is step 5 of http://docs.rapidsms.org/InstallingOnMacOSX, and
yields the following trace:

(rapidsms_dev)vc-41-5-220-67:~ ksharpey$ rapidsms-admin.py
startproject myproject
Traceback (most recent call last):
File "/Users/ksharpey/rapidsms_dev/bin/rapidsms-admin.py", line 15,
in <module>
import rapidsms.management.commands.startproject
ImportError: No module named management.commands.startproject

Is there a file that I can check which rapidsms version pip has
installed? or does it just take the head of trunk?

Cheers,
Kieran

Solomon Adebayo

unread,
Sep 14, 2010, 2:11:49 PM9/14/10
to rapi...@googlegroups.com
Hello,

I'm still unable to resolve the pending installation issue on the Mac OS X;
Comparing the contents of the directory "my_rapidsms_env/lib/python<ver>/site-packages/" on the 2 platforms the following was found;

1/ Ubuntu 904 :
(my_rapidsms_env)soloz@ubuntu:~$ ls rapidsms_dev/lib/python2.6/site-packages/
easy-install.pth            setuptools.pth
setuptools-0.6c9-py2.6.egg


2/  Mac OS X:
(my_rapidsms_env)solomon-adebayos-macbook-pro:~ solomonadebayo$ ls my_rapidsms_env/lib/python2.5/site-packages/

Django-1.2.3-py2.5.egg-info djtables-0.1.1-py2.5.egg-info
RapidSMS-0.9.5a-py2.5.egg-info easy-install.pth
django nose
django_nose nose-0.11.4-py2.5.egg-info
django_nose-0.1.2-py2.5.egg-info pip-0.7.2-py2.5.egg
djappsettings rapidsms
djappsettings-0.1.0-py2.5.egg-info setuptools-0.6c11-py2.5.egg
djtables setuptools.pth
........

Whereas above content was installed in /usr/local/lib/python2.6/dist-packages/ on Ubuntu.


Is the difference in installation locations worthy of note ? Has rapidsms been installed in the wrong location on the Mac ?
Pls note that I'd removed/re-started the Installation on Mac, still got the same error at the Create Project phase;


regards,
Solo.

Nic Pottier

unread,
Sep 14, 2010, 2:27:18 PM9/14/10
to rapi...@googlegroups.com
What do you get when you run:

% python --version

It looks like you are on python 2.5, and although I don't know why
that would cause problems it seems like a possible cause.

What error do you get when you try the startproject command?

-Nic

Nic Pottier

unread,
Sep 14, 2010, 2:31:29 PM9/14/10
to rapi...@googlegroups.com
On Mon, Sep 13, 2010 at 9:41 AM, kieranSharpeySchafer
<kieran....@gmail.com> wrote:
> At step 3 however ("$  rapidsms-admin.py startproject myproject") it
> fails with the stack trace posted by Solomon, going back to:
>
> File "/Users/ksharpey/rapidsms_dev/lib/python2.5/site-packages/
> rapidsms/management/commands/startproject.py", line 31, in
> handle_label shutil.copytree(src_dir, project_name,
> ignore=shutil.ignore_patterns('*.pyc'))
> AttributeError: 'module' object has no attribute 'ignore_patterns'

Ahh.. ok, looking at this explains it.

ignore_patterns was added in Python 2.6, it looks like you guys are on
2.5, so that's why it isn't working.

I'm guessing that would be easy enough to change, though I don't know
if there are other 2.6 dependencies lurking.

-Nic

Tim Akinbo

unread,
Sep 14, 2010, 3:35:02 PM9/14/10
to rapi...@googlegroups.com
Solo,

Could you comment out that line and try running the script again?

Tim Akinbo


Solomon Adebayo

unread,
Sep 14, 2010, 4:27:57 PM9/14/10
to rapi...@googlegroups.com
Hi Tim,

Returned silently but no project created. I'll get Python2.6 installed & resetup the environment.

Perhaps Evan has Python2.6 installed. Could you pls confirm ?


Thanks,
Solo.

Solomon Adebayo

unread,
Sep 14, 2010, 4:35:46 PM9/14/10
to rapi...@googlegroups.com
Oh Tim, I commented out the argument, and it works !
I believe this isnt a permanent fix though. Will go ahead to install Python2.6 & feedback.

Thanks.
Solo.

evan wheeler

unread,
Sep 14, 2010, 5:00:01 PM9/14/10
to rapi...@googlegroups.com
On Tue, Sep 14, 2010 at 4:27 PM, Solomon Adebayo <solom...@gmail.com> wrote:
> Hi Tim,
> Returned silently but no project created. I'll get Python2.6 installed &
> resetup the environment.
> Perhaps Evan has Python2.6 installed. Could you pls confirm ?

Yup i'm on 2.6! Good sleuthing!

evan wheeler

unread,
Sep 14, 2010, 5:11:00 PM9/14/10
to rapi...@googlegroups.com

I think we've been aiming for 2.5 support, so please create an issue
on the issue tracker for this.

I don't think this particular feature is worth ditching 2.5 support.
Otherwise I think most of the other 2.6 stuff (with statements, etc)
in rapidsms can be imported into 2.5 from __future__

Reply all
Reply to author
Forward
0 new messages