Giorgio Doveri
Giorgio Doveri

Reputation: 3

Installed Python module is not found in either IDLE and command prompt

I am trying to write a simple script that should include a library for working with PDFs that I found online called Camelot. I installed it with pip and the module displays in the site-packages folder alongside the other pip-installed modules, but when I try to import it I get this: ModuleNotFoundError: No module named 'camelot'

To be noted:

I'm clearly missing something here. Any ideas?

Upvotes: 0

Views: 182

Answers (1)

Mark F. Sanderson
Mark F. Sanderson

Reputation: 36

Here are the steps that I would take to explore this issue:

  • From the command line directly execute the python 3.10 interpreter with a full path (e.g. c:\python310\bin\python3 - or whatever it is) and then from the python command line manually import the missing package:
import camelot

if that module is found execute the command 'dir' against the newly imported modules to ensure it import successfully with all required attributes present.

dir(camelot)

If this doesn't work, then execute the python interpreter directly using a full path as above for the 3.12 and see what results you get.

  • My next suggestions is that you host the absolute minimum number of python versions on your box. Keeping things simple does have its advantage in my view.

Questions: Are you using pip or pip3? Do you have a python 2.x installation? When you execute the following command, does the originating path make sense for your installation:

c:\> where pip3

This will ensure that your pip3 installation is installing where you believe it is.

Running the first command will indicate all of the python installations that the launcher could find. When you execute py -2 it will either indicate that there is no python 2 install and the python installations it can find or it will indicate which python 2 installations you have.

c:\> py -3 --version 
c:\> py -2 --version

This should tell you all the python versions your windows machine has installed.

-Mark

Upvotes: 0

Related Questions