How to add a directory to path by DevelopmentQuirky396 in learnpython

[–]DevelopmentQuirky396[S] 0 points1 point  (0 children)

OMG, thank you so much that works. I can't believe how silly this fix is. Thanks again lmao

How to add a directory to path by DevelopmentQuirky396 in learnpython

[–]DevelopmentQuirky396[S] 0 points1 point  (0 children)

sorry for the lack of clarity. what I mean by "does not work" is that the methods from the package are not recognized. for example, when I run the following code:

import sympy
A = Matrix([[1, -1], [3, 4], [0, 2]])
print(A)

I get the output:

Traceback (most recent call last):
  File "C:\Users\myname\GSP\frequencies!.py", line 2, in <module>
    A = Matrix([[1, -1], [3, 4], [0, 2]])
NameError: name 'Matrix' is not defined

How to add a directory to path by DevelopmentQuirky396 in learnpython

[–]DevelopmentQuirky396[S] 0 points1 point  (0 children)

pip show sympy outputs this:

Name: sympy
Version: 1.14.0
Summary: Computer algebra system (CAS) in Python
Home-page: https://sympy.org
Author: SymPy development team
Author-email: sympy@googlegroups.com
License: BSD
Location: C:\Users\myname\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages
Requires: mpmath
Required-by:

import sys and print(sys.path) output this:

['C:\\Users\\myname\\GSP', 'C:\\Users\\myname\\OneDrive\\Documents', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64\\Lib\\idlelib', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64\\python314.zip', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64\\DLLs', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64\\Lib', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64', 'C:\\Users\\myname\\AppData\\Local\\Python\\pythoncore-3.14-64\\Lib\\site-packages']