Skip to content

Installation fails on Windows with Python 3.13/3.12 due to multiple compatibility issues #14

@lonerodriguez

Description

@lonerodriguez

Environment

  • OS: Windows 11
  • Python: 3.12 (via conda-forge)
  • compas_ifc: 0.5.0 (pip) / 1.7.0 (local)
  • ifcopenshell: 0.8.5
  • PySide6: 6.8.3

Problems found

1. pip installs outdated version (0.5.0)

pip install compas_ifc installs 0.5.0 instead of latest because
requirements.txt pins ifcopenshell==0.7.0.240406 which does not exist on PyPI.

Fix: Change requirements.txt:
ifcopenshell==0.7.0.240406 → ifcopenshell>=0.8.4

2. AttributeError: 'tuple' object has no attribute 'data' (compas_ifc 0.5.0)

shape.transformation.matrix.data fails because ifcopenshell 0.8.x
returns a tuple instead of an object with .data.

3. Matrix reshape error (compas_ifc 1.7.0, file.py line 322)

ifcopenshell 0.8.x returns a 4x4 matrix (16 values) instead of 4x3 (12 values).
np.array(matrix).reshape((4, 3)) fails with ValueError.

Fix:

matrix = np.array(matrix)
if matrix.size == 12:
    matrix = matrix.reshape((4, 3))
    matrix = np.hstack([matrix, np.array([[0], [0], [0], [1]])])
    matrix = matrix.transpose()
elif matrix.size == 16:
    matrix = matrix.reshape((4, 4))
    matrix = matrix.transpose()

4. material.diffuse API change (file.py line 340)

(*material.diffuse, ...) fails because diffuse is now a colour object.

Fix:

d = material.diffuse
color = (d.r, d.g, d.b, 1 - material.transparency)

5. Qt platform plugin "windows" not found

PySide6 >= 6.10 (required for Python 3.13) has DLL issues on Windows.
Solution: Use Python 3.12 with PySide6==6.8.3

Workaround:

$env:QT_QPA_PLATFORM_PLUGIN_PATH = "...\envs\bim\Lib\site-packages\PySide6\plugins\platforms"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions