import sympy # 引入解方程的专业模块sympy
x,y,z = sympy.symbols("x y z") # 申明未知数"x"和"y"
a = sympy.solve([(x**2 + 9/4*y**2 + z**2 - 1)**3 -x**2 * z**3 - 9/80 * y**2 * z**3],x-1,y-6,[x,y,z]) # 写入需要解的方程组
print(a)
运行后报错
TypeError Traceback (most recent call last)
in ()
1 import sympy # 引入解方程的专业模块sympy
2 x,y,z = sympy.symbols("x y z") # 申明未知数"x"和"y"
----> 3 a = sympy.solve([(x**2 + 9/4*y**2 + z**2 - 1)**3 -x**2 * z**3 - 9/80 * y**2 * z**3],x-1,y-6,[x,y,z]) # 写入需要解的方程组
4 print(a)
D:\Anaconda3\lib\site-packages\sympy\solvers\solvers.py in solve(f, symbols, **flags)
895 exclude = [exclude]
896 exclude = set().union([e.free_symbols for e in sympify(exclude)])
--> 897 symbols = [s for s in symbols if s not in exclude]
898
899 # real/imag handling -----------------------------
D:\Anaconda3\lib\site-packages\sympy\solvers\solvers.py in (.0)
895 exclude = [exclude]
896 exclude = set().union(*[e.free_symbols for e in sympify(exclude)])
--> 897 symbols = [s for s in symbols if s not in exclude]
898
899 # real/imag handling -----------------------------
TypeError: unhashable type: 'list'