While importing rasterio in QGIS is showing Exception: std::bad_alloc
When I re-import rasterio afterwards it shows error:
Traceback (most recent call last): File "/usr/lib/python3.8/code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "/usr/lib/python3.8/codeop.py", line 178, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) File "/usr/lib/python3.8/codeop.py", line 106, in _maybe_compile raise err1 File "/usr/lib/python3.8/codeop.py", line 93, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "/usr/lib/python3.8/codeop.py", line 143, in __call__ codeob = compile(source, filename, symbol, self.flags, 1) File "<input>", line 1 import rasterio ^ SyntaxError: multiple statements found while compiling a single statement Python: 3.8.10
rasterio: 1.2.10
OS: Ubuntu 20.04 LTS . I installed QGIS by apt, and rasterio by pip.

pip install rasterioorpip3 install rasterioorpython3 -m pip install rasterio?pip install rasteriobut now i also triedsudo apt install python3-rasterioit also didn't worked.