1 Installing sympy 1.10.1 on Ubuntu

Installing Python 3.10 and sympy 1.10.1 was very tricky. First Ubuntu 20.04 came with Python 3.8 and it was struggle to make it use Python 3.10 instead. After 2 hrs trying many commands, finally it seems to be using 3.10 now. Next did the following

>which python 
/bin/python 
>python --version 
Python 3.10.4
 

Now

 python -m pip install sympy

Gives

Defaulting to user installation because normal site-packages is not writeable 
Collecting sympy 
Using cached sympy-1.10.1-py3-none-any.whl (6.4 MB) 
Collecting mpmath>=0.19 
Using cached mpmath-1.2.1-py3-none-any.whl (532 kB) 
Installing collected packages: mpmath, sympy 
Successfully installed mpmath-1.2.1 sympy-1.10.1        
 

And now

>python 
Python 3.10.4 (main, Mar 24 2022, 16:12:56) [GCC 9.4.0] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import sympy 
>>> sympy.__version__ 
'1.10.1'