Skip to content
Advertisement

Tag: importerror

Unable to import a module that is definitely installed

After installing mechanize, I don’t seem to be able to import it. I have tried installing from pip, easy_install, and via python setup.py install from this repo: https://github.com/abielr/mechanize. All of this to no avail, as each time I enter my Python interactive I get: The installations I ran previously reported that they had completed successfully, so I expect the import

ImportError: No module named six

I’m trying to build OpenERP project, done with dependencies. It’s giving this error now Could someone guide what’s wrong and how it can be fixed??? Answer You probably don’t have the six Python module installed. You can find it on pypi. To install it: (if you have pip installed, use pip install six instead)

ImportError: No module named mock

So I am trying to use unittest.mock to mock some of my methods in my unit tests. I do: But I am getting: I tried: It’s still not working. Answer unittest is a built-in module; mock is an external library (pre-3.3 betas, anyway). After installing mock via pip install, you import it not by using but Edit: mock has been

Advertisement