This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I encountered following errors during Ubuntu OS upgrade from 14.04 to 16.04: | |
ImportError: No module named 'pypdf2' | |
ImportError: No module named 'passlib' | |
ImportError: No module named 'babel' | |
ImportError: No module named 'werkzeug' | |
ImportError: No module named 'decorator' | |
ImportError: No module named 'dateutil' | |
ImportError: No module named 'psycopg2' | |
ImportError: No module named 'psutil' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue: sudo apt-get remove python3-docutils | |
Downalod Reference: https://launchpad.net/ubuntu/+source/python-docutils/0.13.1+dfsg-1 | |
=============================================================================================================================== | |
Issue: pkg_resources.DistributionNotFound: The 'bleach>=2.1.0' distribution was not found and is required by readme-renderer | |
sudo pip3 install bleach>=2.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#python 3.x | |
import decimal | |
ctx = decimal.getcontext() | |
ctx.rounding = decimal.ROUND_HALF_UP | |
payment_discount = round((decimal.Decimal(amount * line.discount)/decimal.Decimal(100.0)), 2) | |
float(payment_discount) | |
amount = 611.50 | |
discount = 10 |