Search code examples
python-3.xanacondaimporterrorpython-mss

mss module is installed but program is unable to import it (using single version of python)?


I am making a Python program for converting PDF files into images by taking screenshots. Am using Anaconda 3 with Python 3.6.5 (running on Windows 10 Enterprise)

There is no other Python version installed on my system so there is no chance of confusion there.

I created a virtual environment using:

conda create screenshots

Then proceeded to install the following modules:

  1. python=3.6.5 conda install python

  2. pywin32=223 conda install pywin32

  3. mss=1.7.3 conda install -c conda-forge mss

  4. pyautogui=0.9.38 conda install -c conda-forge pyautogui

  5. pyscreenshot=0.4.2 pip install pyscreenshot

  6. pywin32-ctypes=0.0.1 conda install -c conda-forge pywin32-ctypes

  7. pyreadline=2.1 conda install -c anaconda

On activating the environment and listing the modules using

conda list

The above modules are present along with others.

Yet when I run the program, it just gives the ModuleNotFoundError : No module named 'mss'

The rest of the program works fine. It has no trouble importing the other modules given above.

Could someone please tell me what might be the issue here?


Solution

  • Do you are talking about this MSS module? If so, there is no 1.7.3 version, you should try the latest 3.2.1.

    Edit: the module is now available on conda too:

    conda install -c conda-forge python-mss