Python not running inspite of installing pytest

(mflix) fabian@fabian-HP-Compaq-dc7800-Convertible-Minitower:~/Desktop/mflix/virtualenvironment/mflix/bin$ sudo apt install python-logilab-common
Reading package lists… Done
Building dependency tree
Reading state information… Done
python-logilab-common is already the newest version (1.1.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(mflix) fabian@fabian-HP-Compaq-dc7800-Convertible-Minitower:~/Desktop/mflix/virtualenvironment/mflix/bin$ pytest -m connection
Traceback (most recent call last):
File “/usr/bin/pytest”, line 6, in
from logilab.common.pytest import run
ImportError: No module named ‘logilab’
(mflix) fabian@fabian-HP-Compaq-dc7800-Convertible-Minitower:~/Desktop/mflix/virtualenvironment/mflix/bin$

Hi @45678-234,

Try running the following commands in your terminal and let me know if it fixed the issue for you.

conda activate mflix

pip install --upgrade logilab-common 

Traceback (most recent call last):
File “/usr/bin/pytest”, line 6, in
from logilab.common.pytest import run
ImportError: No module named ‘logilab’

Please make sure that you are installing and running all this in the same anaconda environment, which is mflix in your case.

Also, provide the output when you run the command pip install logilab-common

p install --upgrade logilab-common
Collecting logilab-common
Downloading https://files.pythonhosted.org/packages/d5/8a/c72755d7245c8aec6378672770f39a598f40c07131729ccbc7ab376b47ab/logilab-common-1.5.2.tar.gz (177kB)
|████████████████████████████████| 184kB 379kB/s
Requirement already satisfied, skipping upgrade: setuptools in ./virtualenvironment/mflix/lib/python3.5/site-packages (from logilab-common) (42.0.2)
Building wheels for collected packages: logilab-common
Building wheel for logilab-common (setup.py) … done
Created wheel for logilab-common: filename=logilab_common-1.5.2-cp35-none-any.whl size=158915 sha256=f47aa466b9171e778638b338e5238203871513fd26582dfc411808083e4d0039
Stored in directory: /home/fabian/.cache/pip/wheels/d4/89/d1/db9acc45e06afd8abc12fba02ad7f69d41be5d1a98e93a499b
Successfully built logilab-common
Installing collected packages: logilab-common
Successfully installed logilab-common-1.5.2

Hi @Harshavardhan_PK, thank you so much for your help here. @45678-234, can you try running pytest command again? from inside the virtual environment.

Kanika