@@ -96,15 +96,20 @@ pytorch-lightning = [
9696ipywidgets = {version = " >=7.7,<8.2" , optional = true }
9797plotly = {version =" ^5.22.0" , optional = true }
9898nbformat = {version = " >=4.2.0" , optional = true }
99+
100+ # cupy-cuda12x is incompatible with MacOS.
101+ # It's possible to install pure `cupy` and it will be fully compatible
102+ # but it will work only with CPU and will be slower than `numpy`.
103+ # That's why we don't install cupy at all on MacOS and handle it during the import.
99104cupy-cuda12x = [
100- {version = " ^13.3.0" , python = " <3.13" , optional = true },
101- {version = " ^13.4.0" , python = " >=3.13" , optional = true },
105+ {version = " ^13.3.0" , python = " <3.13" , markers = " sys_platform != 'darwin' " , optional = true },
106+ {version = " ^13.4.0" , python = " >=3.13" , markers = " sys_platform != 'darwin' " , optional = true },
102107]
103108# This is a dependency of cupy-cuda12x
104109# poetry can't resolve appropriate version of fastrlock for Python 3.13
105110# and cupy-cuda12x, so we add the version restriction here manually to avoid
106111# installing older version of fastrlock which is incompatible with Python 3.13
107- fastrlock = {version = " ^0.8.3" , optional = true }
112+ fastrlock = {version = " ^0.8.3" , markers = " sys_platform != 'darwin' " , optional = true }
108113
109114[tool .poetry .extras ]
110115lightfm = [" rectools-lightfm" ]
@@ -117,7 +122,7 @@ all = [
117122 " nmslib" , " nmslib-metabrainz" ,
118123 " torch" , " pytorch-lightning" ,
119124 " ipywidgets" , " plotly" , " nbformat" ,
120- " cupy-cuda12x" ,
125+ " cupy" , " cupy -cuda12x" ,
121126]
122127
123128
0 commit comments