Nicolas Kalousek
Nicolas Kalousek

Reputation: 23

I want to run some code using Sympy. However, it says there is no such module

So when I run my program it says that sympy doesn't exist as a module. However, it is installed (see screenshot). I can run Sympy using a virtual python environment. However, then matplot does not work. This is so messed up. Every time I try to run some code with my Mac, it just prompts that import does not exist though it clearly does...

ImportError sympy but requirement satisfied

Upvotes: 0

Views: 153

Answers (1)

Bjoern Dahlgren
Bjoern Dahlgren

Reputation: 930

My guess is that pip and python are using two different versions of Python, you can look in the source code of pip (which pip).

You can try being explicit:

$ python -m pip install --user sympy
$ python -c "import sympy"

You may also want to look into using a Python distribution such as anaconda.

Upvotes: 1

Related Questions