0

I attempted to import a module that I installed using pip into my gtk code, but once I run it I only get an error “ModuleNotFoundError”. It seems that it does not recognize that I even installed the module, Any reason for why this is?

4
  • What command did you use to install module? What version of Python are you using? Add the output of pip list | grep module to your question. – Nasir Riley Jun 11 at 0:57
  • I used Pip3, I am using Python3.8, and it does show up under pip3 list – AndThePanda Jun 11 at 3:27
  • Is your code using pip3 or pip to import the module? – Nasir Riley Jun 11 at 7:49
  • From your description, it sounds like you have multiple versions of Python 3.x. You mentioned you installed your modules with pip3, but did you check that pip3 is actually using the expected version of Python (3.8) and not a different one? Please show how you are invoking Python 3 to run your code and also the output of pip3 -V. – GracefulRestart Jun 11 at 18:30
0

You should ensure you use the right package manager to install a module. You cannot install modules for Python 3 using pip and modules for Python 2 using pip3. If you do, the Python interpreter may not recognize that you have installed a module.

To get details about a package that is currently installed you can use the pip show <package> command

If the information was helpful please don't forget to up vote or accept the answer.

1
  • Well I did install them with the correct method (they also only support python3) so I don’t think that would be the issue – AndThePanda Jun 10 at 23:40

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.