pythonpippython-modulepython-camelot

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?


Solution

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

    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.

    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