Python: module not found, immediately after installing it

I'm working on Ubuntu 17.10

I've installed Python 3.6

I've installed the module named dedupe:

sudo pip install dedupe
...
Successfully installed...
...
sudo pip3 install dedupe
...
Requirement already satisfied...
...

But when I try to run something that uses it I get this error.

$ python dedupe_process.py
Traceback (most recent call last): File "dedupe_process.py", line 11, in <module> import dedupe
ModuleNotFoundError: No module named 'dedupe'

It also doesn't work when I explicitly use python3 to run it.

What am I missing?

4

2 Answers

I also get the same error when i start using "kali linux" . Maybe your python3 is try to find your script's module in the "/usr/local/lib/python3.x" directory . So if that module is not there then the ModuleNotFoundError: No module named 'dedupe' error is happening .

Actually I don't have permanent solution, but you can try following one ..........

To solve that problem simpley go to that directory where the module is present to see the directory just run sudo pip3 install "moduleName" command on the "terminal" you probably get something like this :-

"Requirement already satisfied: 'moduleName' in /usr/local/lib/python3.x/dist-packages (moduleVersion)"
or
"Requirement already satisfied: 'moduleName' in /usr/lib/python3/dist-packages (moduleVersion)".

Then just copy that `Module` to the `/usr/local/lib/python3.` directory......

Hopefully it should work....... Thank you...

Try:

pip install dedupe

Without 'sudo' command. Otherwise you'll install library without rw permissions for common user (only root can rw)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like