How to install sympy package in python
Solution 1
Agree with Dixit.
First Solution:
It's okay to use pip3 install sympy
on MacOS.
- List item
- Open your "Terminal".
- Input
pip3 install sympy
and press enter. - It will automatically download and install the Sympy Package.
Second Solution:
Using git. # Notice: Before install Sympy, it's necessary to install "mpmath". Like the First Solution,
- 1) Open "Terminal";
- 2) Input
pip3 install mpmath
After installing "mpmath", then,
- List item
- Open your "Terminal" on MacOS or "win+r", then input "cmd" in Windows.
- Input "git clone git://github.com/sympy/sympy.git" and press enter;
- Input "python setup.py install"
After finish installation, you can open the Python IDLE and try:
from sympy import Symbol, cos
x = Symbol('x')
e = 1/cos(x)
print(e.series(x, 0, 10))
# Result
# 1 + x**2/2 + 5*x**4/24 + 61*x**6/720 + 277*x**8/8064 + O(x**10)
If the code works, it shows that your "Sympy" package has already been installed.
Solution 2
In anaconda navigator:
- Click Environments (on the left)
- Choose your environment (if you have more than one)
- On the middle pick "All" from dropbox ("installed" by default)
- Write sympy in search-box on the right
- Check the package that showed out
- Click apply
acoustic python
Updated on January 24, 2020Comments
-
acoustic python over 4 years
I am a beginner to python, I wanted to symbolic computations. I came to know with sympy installation into our pc we can do symbolic computation. I have installed python 3.6 and I am using anaconda nagavitor, through which I am using spyder as an editor. now I want to install symbolic package sympy how to do that. I checked some post which says use 'conda install sympy'. but where to type this? I typed this in spyder editor and I am getting syntax error. thankyou
-
acoustic python over 5 yearsI could not able to see the apply button
-
acoustic python over 5 yearssorry I am a beginer what is git
-
acoustic python over 5 yearsIts, not showing in my anaconda window. what I have to do
-
acoustic python over 5 yearsactually I am a windows user . how to do the same in windows
-
pandalai over 5 years@acoustic python Did you try "pip3 install sympy"? It also works in Windows.
-
acoustic python over 5 yearsFinally I got the result. But the code is running in the spyder editor , but not running in the python shell. it is still showing module not found error
-
pandalai over 5 yearsMaybe the package still has not been installed at the path of Python-3.6. Anyway, if you accept my answer, please tick it. Thanks!