无法解决ModuleNotFoundError:没有名为“ sympy”的模块

时间:2020-01-12 01:04:23

标签: python anaconda octave sympy

有人可以帮助我解决以下问题吗?我感到非常沮丧。我之前已经用符号包安装过Octave,但是我忘记了我是怎么做的,目前我对自己感到很沮丧。我已经安装了Anaconda,Python和Octave,并且不断收到以下错误消息:

Symbolic pkg v2.8.0: Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sympy'
error: Python cannot import SymPy: have you installed SymPy?
    Try "sympref diagnose" for more information.
error: called from
    assert_have_python_and_sympy at line 123 column 7
    python_ipc_popen2 at line 79 column 5
    python_ipc_driver at line 59 column 15
    python_cmd at line 163 column 11
    valid_sym_assumptions at line 38 column 10
    assumptions at line 82 column 7
    syms at line 97 column 13

1 个答案:

答案 0 :(得分:0)

您是否已经尝试通过csvlist = [['name','grade','lesson','number'], ['Jade','8','English',1], ['Jade','8','English',3], ['Jade','8','French',4], ['James','7','Maths',3]] names_dic = {'Jade':{'skip':2,'gpa':8.34}, 'Mark':{'skip':16,'gpa':5.67}} lesson = dict() min_grade = 8 for student in csvlist[1:]: student_name = student[0] student_grade = student[1] student_lesson = student[2] student_number = student[3] # if the key exists add the number if float(student_grade) >= min_grade: if not lesson.get(student_name, False): lesson[student_name] = {} try: lesson[student_name][student_lesson] += student_number except: lesson[student_name][student_lesson] = student_number # printing for student_k, student_v in lesson.items(): print(student_k) for student_lesson in student_v.items(): print(student_lesson) print() 安装它?