Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'shapely' #165

Closed
denprog opened this issue Jun 22, 2024 · 2 comments
Closed

ModuleNotFoundError: No module named 'shapely' #165

denprog opened this issue Jun 22, 2024 · 2 comments

Comments

@denprog
Copy link

denprog commented Jun 22, 2024

Using Blender 3.0.1 (Ubuntu 22.04) and blendercam 1.0.23 when I do a parallel path I get this error:

FAIL module 'shapely' has no attribute 'contains'
  File "/home/denis/.config/blender/3.0/scripts/addons/cam/ops.py", line 200, in _calc_path
    await gcodepath.getPath(context, o)
  File "/home/denis/.config/blender/3.0/scripts/addons/cam/gcodepath.py", line 560, in getPath
    await getPath3axis(context, operation)
  File "/home/denis/.config/blender/3.0/scripts/addons/cam/gcodepath.py", line 686, in getPath3axis
    chunks.extend(await sampleChunks(o, pathSamples, layers))
  File "/home/denis/.config/blender/3.0/scripts/addons/cam/utils.py", line 465, in sampleChunks
    ambient_contains = shapely.contains(o.ambient, shapely.points(our_points[:, 0:2]))
CALCULATED PATH (success=FINISHED,retval=False
Error: module 'shapely' has no attribute 'contains'

Using Blender 4.1.1 I can not install blendercam:

Requirement already satisfied: shapely in /home/denis/.local/lib/python3.11/site-packages (2.0.4)
Requirement already satisfied: Equation in /home/denis/.local/lib/python3.11/site-packages (1.2.1)
Requirement already satisfied: opencamlib in /home/denis/.local/lib/python3.11/site-packages (2023.1.11)
Requirement already satisfied: numpy<3,>=1.14 in /opt/blender-4.1.1-linux-x64/4.1/python/lib/python3.11/site-packages (from shapely) (1.24.3)
Traceback (most recent call last):
  File "/opt/blender-4.1.1-linux-x64/4.1/scripts/modules/addon_utils.py", line 376, in enable
    mod = importlib.import_module(module_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/blender-4.1.1-linux-x64/4.1/python/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/denis/.config/blender/4.1/scripts/addons/cam/__init__.py", line 42, in <module>
    from .cam_operation import camOperation
  File "/home/denis/.config/blender/4.1/scripts/addons/cam/cam_operation.py", line 9, in <module>
    from shapely import geometry as sgeometry
ModuleNotFoundError: No module named 'shapely'

I'm not very familar with python. What's going on here? It found it, isn't it? But cannot find. I tried reinstall shapely with
sudo apt install python3-shapely
pip install shapely
but result is the same.
So how to install the latest version of blendercam?

@pppalain
Copy link
Owner

did you get that issue resolved?

@denprog
Copy link
Author

denprog commented Sep 11, 2024

Yes, AFAIR I removed shapely completely and installed a plugin via Blender, I don't remember which one).

@denprog denprog closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants