Error while calling round() from future.builtins

2014-05-10 Thread Preethi
Hi,

I am new to python. I am getting an error "AttributeError: type object 
'Decimal' has no attribute 'from_float'" when I run the following in python 
prompt:

>>> from future.builtins import int, round
>>> int(round(5))
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/lib/python2.6/site-packages/future/builtins/backports/newround.py", line 
32, in newround
d = Decimal.from_float(number).quantize(exponent,
AttributeError: type object 'Decimal' has no attribute 'from_float'

I am running this on Centos 6.5 which has python version 2.6.6
This is the output of 'pip freeze':

Django==1.6.4
Mezzanine==3.1.4
Pillow==2.4.0
South==0.8.4
bleach==1.4
django-appconf==0.6
django-compressor==1.3
filebrowser-safe==0.3.3
future==0.9.0
grappelli-safe==0.3.10
html5lib==0.999
iniparse==0.3.1
oauthlib==0.6.1
psycopg2==2.5.2
pycurl==7.19.0
pygpgme==0.1
pytz==2014.2
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
tzlocal==1.0
urlgrabber==3.9.1
yum-metadata-parser==1.1.2

This is the order in which I installed the above packages. (The box initially 
had python 2.6.6 installed)

yum install gcc python python-setuptools python-devel
yum install libjpeg-turbo-devel
python get-pip.py
pip install -U pip
pip install South django-compressor
pip install mezzanine
yum install postgresql93-server.x86_64
yum install postgresql-devel
sudo pip install psycopg2

What am I missing? Any help is greatly appreciated.

Thanks,
Preethi
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Error while calling round() from future.builtins

2014-05-12 Thread Preethi
On Saturday, May 10, 2014 5:26:56 PM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 10 May 2014 04:39:05 -0700, Preethi wrote:
> 
> 
> 
> > Hi,
> 
> > 
> 
> > I am new to python. I am getting an error "AttributeError: type object
> 
> > 'Decimal' has no attribute 'from_float'" when I run the following in
> 
> > python prompt:
> 
> > 
> 
> >>>> from future.builtins import int, round 
> 
> 
> 
> I get an error when I try that:
> 
> 
> 
> 
> 
> py> from future.builtins import int, round
> 
> Traceback (most recent call last):
> 
>   File "", line 1, in 
> 
> ImportError: No module named future.builtins
> 
> 
> 
> 
> 
> Perhaps you are using the third-party library "future"? 
> 
> 
> 
> https://pypi.python.org/pypi/future
> 
> 
> 
> If so, then I believe the library is buggy and you should report it to 
> 
> the Centos package maintainer. You might also manually install a more 
> 
> recent version of future.
> 
> 
> 
> Decimal.from_float was only added in 2.7, it is not available in 2.6.
> 
> 
> 
> https://docs.python.org/2/library/decimal.html#decimal.Decimal.from_float
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Steven D'Aprano
> 
> http://import-that.dreamwidth.org/

Yes, I upgraded to 0.12.0 and it worked! Thanks a lot!
-- 
https://mail.python.org/mailman/listinfo/python-list


PERSONAL BANKRUPTCY

2008-06-08 Thread PREETHI
http://onenesstemplenemam.blogspot.com
http://bankruptcy5.blogspot.com/
http://filingbankruptcy1.blogspot.com/
http://bankruptcyattorney1.blogspot.com/
http://personalbankruptcy1.blogspot.com/
http://chapter13bankruptcy1.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list


DIGITAL TV

2008-06-16 Thread PREETHI
DIGITAL TVhttp://digitaltvtech.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list