compas: Can't use compas in blender 2.92

>>> import compas

Works fine.

>>> import compas_blender
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas_blender\__init__.py", line 22, in <module>
    from .utilities import *  # noqa: F401 F403
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas_blender\utilities\__init__.py", line 81, in <module>
    from .drawing import (
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas_blender\utilities\drawing.py", line 7, in <module>
    from compas.geometry import centroid_points
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas\geometry\__init__.py", line 635, in <module>
    from .transformations import (
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas\geometry\transformations\__init__.py", line 18, in <module>
    from .transformations_numpy import *  # noqa: F401 F403
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\compas\geometry\transformations\transformations_numpy.py", line 5, in <module>
    from numpy import asarray
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\numpy\__init__.py", line 143, in <module>
    from . import lib
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\numpy\lib\__init__.py", line 45, in <module>
    __all__ += type_check.__all__
NameError: name 'type_check' is not defined

Doesn’t, because:

>>> import numpy
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\numpy\__init__.py", line 143, in <module>
    from . import lib
  File "C:\Users\a\scoop\apps\blender\current\2.92\python\lib\site-packages\numpy\lib\__init__.py", line 45, in <module>
    __all__ += type_check.__all__
NameError: name 'type_check' is not defined

Context

Windows==10
Python==3.7
compas==1.2.1

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

image

And here’s a working setup for latest compas and latest Blender.

  • Blender 2.92
  • compas 1.2.1
  • numpy 1.17.5
  • python 3.7.10

I think an environment that is built specifically for blender makes sense, we could prepare a couple of environment.yml files, one for each version of Blender that we support, it’s not a lot of work and we’d get into a more consistent situation for sure.