Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71244
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-05-10 04:39 -0700 |
| Message-ID | <591c2939-7648-47f5-854e-ad254a8a732f@googlegroups.com> (permalink) |
| Subject | Error while calling round() from future.builtins |
| From | Preethi <preethidasa@gmail.com> |
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 "<stdin>", line 1, in <module>
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Error while calling round() from future.builtins Preethi <preethidasa@gmail.com> - 2014-05-10 04:39 -0700
Re: Error while calling round() from future.builtins Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 11:56 +0000
Re: Error while calling round() from future.builtins Preethi <preethidasa@gmail.com> - 2014-05-12 02:17 -0700
Re: Error while calling round() from future.builtins Jerry Hill <malaclypse2@gmail.com> - 2014-05-10 10:41 -0400
csiph-web