Getting "ModuleNotFoundError" even though it just got installed by pip

Hello,

I am trying to install SpecklePy. As per the instruction on Introduction | Speckle Docs, I run the command “pip install specklepy” in the terminal.

This prompts me with the following messages:

Installing collected packages: specklepy
Successfully installed specklepy-2.9.0

However, when testing the package, I am met with a “ModuleNotFoundError”. I already have tried reinstalling the package. I also tried following the instructions on the GitHub repo, but this did not work either.

Is anyone able to help me with this issue? Thanks!

Hey @Kasper_Jordt welcome to these parts! Feel free to Introduce yourself :person_gesturing_ok: if you’d like!

Can you please share the snippet of code that gives you that error? Also, what version of Python are you using?

1 Like

Hello @Kasper_Jordt

this is usually the sign of some misconfiguration of the python interpreter / virtual environments.
Can you describe, how you are trying to run the given script?

I’m asking, cause i cannot reproduce your issue unfortunately.

Running:
$ python -m pip install specklepy
installs the package successfully

$ python -m pip list
gets the installed packages, including specklepy
image

starting the python REPL and typing
import specklepy
works without raising an ModuleNotFoundError

image

Could you please follow my steps to try to reproduce your issue?
Also please note, that I’m using python -m pip ... to install packages, to avoid path configuration errors around the python and the pip executables.

1 Like

Hello, thanks for your suggestions!

What caused the issue was that pip was installing the package a different location than then one my python was running from. So basically what gjedlickska said :slight_smile:

3 Likes