Mar-07-2019, 06:22 AM
Since a couple of hours ago, I believed that (pip) installer was saved somewhere and kept when libraries were called by Python2 or Python3.
Opening my OS
1st test, successfully done, Python2 works properly
Opening my OS
Ubuntu 16.04.6 LTS
and being checked through pip freeze that this lib sympy==1.3
was working, I tested such a code# ------- ind_int.py --------- from sympy import * x = symbols('x') a = Integral(cos(x)*exp(x), x) print (Eq(a, a.doit()))Versions installed are as follows:
Output:alfabeta@ubuntu:~/Scrivania$ python -V
Python 2.7.12
Py2 called via python command
----------
alfabeta@ubuntu:~/Scrivania$ python3 -V
Python 3.5.2
Py3 called via python3 command
1st test, successfully done, Python2 works properly
alfabeta@ubuntu:~/Scrivania$ python ind_int.py Eq(Integral(exp(x)*cos(x), x), exp(x)*sin(x)/2 + exp(x)*cos(x)/2)2nd test, fails, Python3 doesn't read sympy lib
alfabeta@ubuntu:~/Scrivania$ python3 ind_int.py Traceback (most recent call last): File "ind_int.py", line 2, in <module> from sympy import * ImportError: No module named 'sympy'Any idea on how overcome the drawback? Thx in advance