[rabbitmq-discuss] Pika AttributeError: Channel instance has no attribute 'start_consuming'
Gavin M. Roy
gmr at myyearbook.com
Tue May 31 19:32:03 BST 2011
Is it possible that an older version of pika is also installed in the global scope?
You could install in virtualenv to keep it local:
gmr at binti ~ $ virtualenv --no-site-packages test
New python executable in test/bin/python2.6
Also creating executable in test/bin/python
Installing setuptools............done.
Installing pip...............done.
gmr at binti ~ $ cd test/
gmr at binti ~/test $ ls
bin include lib lib64
gmr at binti ~/test $ source bin/activate
(test)gmr at binti ~/test $ pip install pika
Downloading/unpacking pika
Downloading pika-0.9.5.tar.gz
Running setup.py egg_info for package pika
Installing collected packages: pika
Running setup.py install for pika
Successfully installed pika
Cleaning up...
(test)gmr at binti ~/test $ python -c "import pika;print pika.__version__"
0.9.5
(test)gmr at binti ~/test $
On Tuesday, May 31, 2011 at 2:27 PM, KooT wrote:
> I don't have root access there, i want pika as local lib :|
>
> On 31 Maj, 20:25, "Gavin M. Roy" <g... at myyearbook.com (http://myyearbook.com)> wrote:
> > That doesn't look like a 0.9.5 install.
> >
> > Have you tried pip or easy_install?
> >
> > gmr at binti ~ $ sudo pip install pika
> > Downloading/unpacking pika
> > Downloading pika-0.9.5.tar.gz
> > Running setup.py egg_info for package pika
> > Installing collected packages: pika
> > Running setup.py install for pika
> > Successfully installed pika
> > Cleaning up...
> > gmr at binti ~ $ python -c "import pika;print pika.__version__"
> > 0.9.5
> >
> >
> >
> >
> >
> >
> >
> > On Tuesday, May 31, 2011 at 2:21 PM, KooT wrote:
> > > rkot at a0:~$ python2.7 -c "import pika;print pika.__version__"
> > > Traceback (most recent call last):
> > > File "<string>", line 1, in <module>
> > > AttributeError: 'module' object has no attribute '__version__'
> >
> > > On 31 Maj, 20:15, "Gavin M. Roy" <g... at myyearbook.com (http://myyearbook.com)> wrote:
> > > > Sounds like it may not be Pika 0.9.5, how did you install?
> >
> > > > What output do you get if you do:
> >
> > > > python -c "import pika;print pika.__version__"
> >
> > > > On Tue, May 31, 2011 at 2:10 PM, KooT <rafal... at gmail.com (http://gmail.com)> wrote:
> > > > > Yes, its worker.py from
> > > > > http://www.rabbitmq.com/tutorials/tutorial-two-python.html
> >
> > > > > #!/usr/bin/env python
> > > > > import pika
> > > > > import time
> >
> > > > > connection = pika.BlockingConnection(pika.ConnectionParameters(
> > > > > host='localhost'))
> > > > > channel = connection.channel()
> >
> > > > > channel.queue_declare(queue='task_queue', durable=True)
> > > > > print ' [*] Waiting for messages. To exit press CTRL+C'
> >
> > > > > def callback(ch, method, properties, body):
> > > > > print " [x] Received %r" % (body,)
> > > > > time.sleep( body.count('.') )
> > > > > print " [x] Done"
> > > > > ch.basic_ack(delivery_tag = method.delivery_tag)
> >
> > > > > channel.basic_qos(prefetch_count=1)
> > > > > channel.basic_consume(callback,
> > > > > queue='task_queue')
> >
> > > > > channel.start_consuming()
> >
> > > > > On 31 Maj, 16:02, "Gavin M. Roy" <g... at myyearbook.com (http://myyearbook.com)> wrote:
> > > > > > Are you using the BlockingConnection adapter?
> >
> > > > > > On Tuesday, May 31, 2011 at 9:30 AM, KooT wrote:
> > > > > > > python worker.py
> > > > > > > [*] Waiting for messages. To exit press CTRL+C
> > > > > > > Traceback (most recent call last):
> > > > > > > File "worker.py", line 22, in ?
> > > > > > > channel.start_consuming()
> > > > > > > AttributeError: Channel instance has no attribute 'start_consuming'
> >
> > > > > > > I got pika 0.9.5
> > > > > > > _______________________________________________
> > > > > > > rabbitmq-discuss mailing list
> > > > > > > rabbitmq-disc... at lists.rabbitmq.com (http://lists.rabbitmq.com) (mailto:
> > > > > rabbitmq-disc... at lists.rabbitmq.com (http://lists.rabbitmq.com))
> > > > > > > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> > > > > > _______________________________________________
> > > > > > rabbitmq-discuss mailing list
> > > > > > rabbitmq-disc... at lists.rabbitmq.comhttps://
> > > > > lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss (http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss)
> > > > > _______________________________________________
> > > > > rabbitmq-discuss mailing list
> > > > > rabbitmq-disc... at lists.rabbitmq.com (http://lists.rabbitmq.com)
> > > > > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> > > > _______________________________________________
> > > > rabbitmq-discuss mailing list
> > > > rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss(http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss)
> > > _______________________________________________
> > > rabbitmq-discuss mailing list
> > > rabbitmq-disc... at lists.rabbitmq.com (mailto:rabbitmq-disc... at lists.rabbitmq.com (http://lists.rabbitmq.com))
> > > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> >
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss (http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss)
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110531/d4d88a85/attachment-0001.htm>
More information about the rabbitmq-discuss
mailing list