from sympy.solvers import solve
from sympy import Symbol
x = Symbol('x')
print solve(x*2 - 5, x)
Output:
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ###########/main.py
Traceback (most recent call last):
File "###########/main.py", line 17, in <module>
factor = int(next(res.results).text[4:])
ValueError: invalid literal for int() with base 10: '9/40'
Process finished with exit code 1
To clarify, I am using python 2.7
What I would like it to do would be to output in decimal
As for the different results (and 9/40 makes no sense), maybe this could be due to python2.7?