0

No module named 'imutils' even after installing it. I am using macOS and sublime Text Editor. When I tried to build, I receive the error message No module named 'imutils' but when I run pip3 install imutils in terminal I get requirement already satisfied.

How can I solve this problem ?

Godspower
  • 87
  • 2
  • 6

2 Answers2

3

This may be caused by your python version. If you have several python versions installed, you need to install that module for a specific python version. As an example, in my Linux, python 2 is installed and is a default python and when you run pip install somemodule it installs that module for python 2. So try running

python* -m pip install imutils

Where * is your python version

Michael
  • 657
  • 4
  • 29
  • Hi Muhammadraul, thank you very much for your contribution. I have both python 2.7 and 3.7 installed. However, found that I can solve the problem by creating two different build systems for python 2.7 and 3.7. – Godspower May 11 '20 at 11:20
1

After researching, I found that I can solve the problem by creating two different build systems for the different python versions. This allowed me to select the python version with the required installations depending on the project. That works!

I created python3.7 build systems using this approach and it works! Replacing python with your python path.{"cmd": ["python", "-u", "$file"], "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", "selector": "source.python"}

Godspower
  • 87
  • 2
  • 6