MAS
MAS

Reputation: 4993

How to check the current version of sympy and upgrade to the latest version?

How to check the current version of SymPy and upgrade to the latest version?

I am using macOS. The way I installed my current version is using pip install sympy.

Upvotes: 24

Views: 16784

Answers (3)

lilith
lilith

Reputation: 1

For current version of sympy:

>>> import sympy
>>> sympy.__version__
'1.1.2.dev'

Upvotes: -2

EricR
EricR

Reputation: 579

Use pip list to list all packages and their versions. You can pipe it to grep to search for the package your interested in:

pip list | grep sympy

Alternatively to get all information about that package including version you can use pip show:

pip show sympy

To upgrade it's simply:

pip install --upgrade sympy

If you need write permissions to your python installation directory don't forget to prepend the pip install command with a sudo: e.g. sudo pip install --upgrade sympy

Upvotes: 15

Sudhanshu Mishra
Sudhanshu Mishra

Reputation: 2092

To check the current version of sympy:

In [6]: import sympy

In [7]: sympy.__version__
Out[7]: '0.7.6-git'

For stable release:

$ pip install --upgrade sympy

For latest features:

$ pip install --upgrade git+ssh://[email protected]/sympy/sympy.git

Upvotes: 20

Related Questions