I installed the Python scipy stack using the following command taken from here
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
However, I can import sympy
only in Python 2.7.6
which is the default Python version when I type in python
in the terminal. When I start Python 3.4.0
by typing in python3
, the import sympy
statement throws the error
>>> import sympy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'sympy'
How do I fix this problem?
Best Answer
You can use
pip3
(which is just normalpip
but in system's Python3 packages). Normally I would suggest avoiding using pip for installing stuff globally but given there are no packages for this that could overwrite the files, there's nothing to lose.It's quick and simple: