Error finding module after installing Python Sympy

Asked 2 years ago, Updated 2 years ago, 119 views

cmd has installed sympy via pip install sympy code. If you type pip install sympy in cmd again, Requirement already satisfied: sympy in c:\programdata\anaconda3\lib\site-packages (1.1.1) It says that the installation has already been completed.

But I'm trying to use the sympy module on Python The moment you do the "from sympy import symbol" Module NotFoundError: No module named 'sympy'ㅜ<

I'd appreciate your help.

module sympy python

2022-09-21 15:35

1 Answers

Run python in reply mode (evaluation mode with >>>) Do the following to see if the path entry contains c:\programdata\anaconda3\lib\site-packages.

If not,

sys.path.append('c:\programdata\anaconda3\lib\site-packages')

Add it like this.

In [1]: import sys

In [2]: sys.path
Out[2]:
['',
 '/home/allinux/workspace/lang/py37/bin',
 '/usr/local/lib/python37.zip',
 '/usr/local/lib/python3.7',
 '/usr/local/lib/python3.7/lib-dynload',
 '/home/allinux/workspace/lang/py37/lib/python3.7/site-packages',
 '/home/allinux/workspace/lang/py37/lib/python3.7/site-packages/IPython/extensions',
 '/home/allinux/.ipython']


2022-09-21 15:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.