Error when installing necessary libraries

I got an error when installing necessary libraries in the first code cell.

Here is the error message

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pytest-astropy 0.8.0 requires pytest-cov>=2.0, which is not installed.
pytest-astropy 0.8.0 requires pytest-filter-subpackage>=0.1, which is not installed.
spyder 4.0.1 requires pyqt5<5.13; python_version >= “3”, which is not installed.
spyder 4.0.1 requires pyqtwebengine<5.13; python_version >= “3”, which is not installed.
sagemaker 2.165.0 requires importlib-metadata<5.0,>=1.4.0, but you have importlib-metadata 6.6.0 which is incompatible.
sparkmagic 0.20.4 requires nest-asyncio==1.5.5, but you have nest-asyncio 1.5.6 which is incompatible.
spyder 4.0.1 requires jedi==0.14.1, but you have jedi 0.18.2 which is incompatible.

=======

Does anyone had same issue? How to solve it?

As the error is suggesting you have conflict between some of your packages. You should use a virtual environment to install your packages. These are the commands to install and use virtual env.

 python -m venv env_name
 source env_name/bin/activate

After activating the virtual env using second line try installing this package from scratch.
It will also help you with other error of non-root user.