Install a Python package on QGIS
For installing python packages for your Ubuntu QGIS-3, you don't need to launch Python Console. First, in bash console:
sudo su
[sudo] password for user:
apt-get install python3-pip
pip3 install name_of_desired_package
Afterward, you can launch Python Console in QGIS 3 as in following image (where I imported geopandas third party python module installed with pip3):