No module named even though i installed it and added it to poetry

i typed pip install findListInList,
and poetry add findListInList.

It all succeeded, but, when i tried import findListInList, it said: no module named ‘findListInList’

Can you provide the repl link?

This screenshot is taken from your repl, opening the directory containing the externally installed package (idk what it’s called so let’s call them this way for now)

So basically you have installed findListInList from poetry, which it IS called ‘findListInList’ in pypi (the platform holding the user created packages that you install via poetry/pip)
But, they named it ‘findlist’ for the actual module
Yes that’s legit and does exist, try import ‘findlist’ instead of ‘findListInList’ (or import finder I forgo)

To import the findListInList module into your repl, you need to add this line to your python file:

import findlist

You will not be able to call the find function from this module, because in the file the find function has not been created or imported.

If you are the author of this module, add to file this line of code:

from findlist.finder import find
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.