Reputation: 15
I try to run Sympy, a library for Python but I got a problem...
When I import Sympy in the console
>>> import os
>>> from os import chdir
>>> chdir("C:/sympy-0.7.2")
>>> import sympy
>>>
It works, but if I make a script with this content...ERROR! Why ?
This error
Traceback (most recent call last):
File "**", line 4, in <module>
import sympy
ImportError: No module named sympy
Upvotes: 1
Views: 2976
Reputation: 85442
Run the script from C:/sympy-0.7.2
.
Better yet, install sympy
. It will go into your site-packages
directory
and will be available from anywhere. Going into C:/sympy-0.7.2
and typing python setup.py install
should work.
Upvotes: 1
Reputation: 1473
try this..
import sys
sys.path.append("C:/sympy-0.7.2")
import sympy
Upvotes: 7