Blender - No module named 'specklepy'

Hey there,

I’ve been following speckle for a while and have just decided to roll my sleeve’s up and have a ‘play’ as we are keen to look at new ways of working for our Arch Tech courses at the Uni I work at. I’ve got the Speckle Manager installed and running and the Revit & Dynamo connector(s) are installed but I am having some problems with speckle-blender. I’ve installed specklepy using pip and confirmed it’s there, but when I try to enable the add-on in blender (2.92) it complains that:

Speckle not found.
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\nige7\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bpy_speckle\__init__.py", line 56, in <module>
    from specklepy.api.client import SpeckleClient  # , SpeckleCache
ModuleNotFoundError: No module named 'specklepy'

I am in no way a pythonista (C# is more my game) so am well aware that I am probably missing something super obvious here, but has anyone got any ideas what is going on?

Thanks

1 Like

Hey @NigeDemo !

Welcome to the forum and thanks for your interest in the Blender Connector :blush:

This is partially our fault as we haven’t packaged up the Blender Connecter yet as it’s still very wip :sweat_smile:. I’m actually planning on getting this done this week so if you’d rather chill for a bit and wait to be able to download from Manager then feel free. I’ll come back here and ping when it’s up!

If you want to start playing around now, you’ll need to move the dependencies into the directory Blender is expecting yourself. Blender is packaged with its own version of python and does not use your system wide python installation. Here are the steps:

  1. install poetry
    We use poetry instead of pip for package management. You can get it here

  2. configure poetry to create virtual envs in the proj directory by running this one-time command

poetry config virtualenvs.in-project true
  1. install dependencies by running the following command from within the speckle-blender dir
poetry install
  1. move the dependencies to Blender
    You will see a .venv directory within the speckle-blender directory. In .venv/Lib/site-packages are all the dependencies. You’ll want to take the contents of this folder and paste it into
    AppData/Roaming/Blender Foundation/Blender/2.92/scripts/addons/modules

Hope that helps! Let me know if you run into any issues or if you have any suggestions / feedback! Feel free to introduce yourself in the intros thread as well if you’d like :sparkles:

1 Like

Fabulous explanation, thank you. I am totally a serial early adopter :rofl:

I did wonder if it had something to do with blender using it’s own python install …

I might wait for you to package it up before showcasing speckle to my colleagues in the faculty though :wink:

1 Like

Haha you’re at the bleeding edge with this one :sweat_smile:

I hear ya though! I’ll put this higher on my prios and give you a ping once it’s up on Manager! :+1:

Cheers!

1 Like

OK so I couldn’t wait :rofl:

I’m pretty sure I followed your instructions correctly - I ended up with a site packages folder that looked like this:

Next, I copied that all to a new folder called modules in the blender addons folder in %AppData%, but when I try and enable the addon I now get a slightly different error …

Speckle not found.
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\nige7\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bpy_speckle\__init__.py", line 60, in <module>
    from bpy_speckle.operators import *
  File "C:\Users\nige7\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bpy_speckle\operators\__init__.py", line 1, in <module>
    from .users import LoadUsers, LoadUserStreams
  File "C:\Users\nige7\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bpy_speckle\operators\users.py", line 15, in <module>
    from bpy_speckle.functions import _report
  File "C:\Users\nige7\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bpy_speckle\functions.py", line 1, in <module>
    import speckle
ModuleNotFoundError: No module named 'speckle'

It looks like it’s getting a bit further this time - any idea?

Or maybe I should just wait until you’ve packaged up the connector for Blender? Remote debugging is the worse :wink:

Haha I love the enthusiasm :partying_face:

Oh boy ok this is embarrassing, but can you please pull latest from main and re copy over the bpy_speckle folder to addons? Totally my bad, but I guess I didn’t fully clean out all my modules and missed these errors when I swapped over from the local ref to the specklepy ref :sweat_smile: All should work now though hopefully!

Haha - yes I’m can be very enthusiastic at times … lol

OK so that has worked - and the add-on is enabled - time to have a play :grin:

Thanks for your help with this :raised_hands:

OK so I’m going to leave this for tonight but I can now select my only stream (created from Revit) from the Speckle UI in Blender and while I can see the ‘Stream101’ collection has been added in the Outliner there doesn’t appear to be any geometry attached to it … ? Any idea why that is?

Once again, thanks for your help today. I think I’m going to enjoy using Speckle :grinning:

1 Like

Hmm that’s a bit odd - in theory anything with a display mesh should come through with geometry. I’ll have to do some testing on my own to figure out what’s going on. Thanks for letting me know! The Blender connector is very wip at the moment, so there are quite a few rough edges :sweat_smile:

Full transparency though, the main workflow that is being tested right now is between Rhino and Blender. If you have a fun Rhino model handy, feel free to give that a go and let me know how it goes!

Also, there will be a lot of changes getting merged in very soon, so stay tuned :sunglasses:

3 Likes

OK no worries. Totally understand.

I don’t use Rhino but I’ve installed a trial so will have a play with that over the next few days. To be honest, I probably need to fully get my head around what Speckle is capable of using platforms/software that I’m familiar with first, haha. Thanks for you time :+1:

1 Like

Fair play! If you’d like, you can have a look at some of our interop tutorials to help you out. For instance, we’ve got a Rhino to Revit tutorial which includes a sample Rhino model which you can download and play with! I’ve personally received this model in blender from speckle for testing :star2:

((the materials support you see here to be merged in imminently :sweat_smile:))

1 Like

hey @NigeDemo i’m back with some news ~

the Blender Connector is finally out on manager :partying_face::partying_face::partying_face:

same warnings as before apply though - it is still very wip and there are a lot of rough edges :sweat_smile: but at least now you and your colleagues will be able to easily install it!

if you have any feedback, requests, or even desire to contribute :eyes: just hit me up or add an issue to the github repo! excited to see what you get up to with this :sparkles:

1 Like