Comments (6)
@abeleinin Thanks it is now working!
from mlx.
Can you run env CMAKE_BUILD_PARALLEL_LEVEL="" pip install . -v
and share the output ?
from mlx.
Can you run
env CMAKE_BUILD_PARALLEL_LEVEL="" pip install . -v
and share the output ?
The command to build the release binary is now working, but the editable one is the only one failing, so I ran env CMAKE_BUILD_PARALLEL_LEVEL="" pip install -e . -v
. This is the output:
% env CMAKE_BUILD_PARALLEL_LEVEL="" pip install -e . -v
Using pip 23.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
Obtaining file:///Users/lucasste/Documents/mlx
Running command pip subprocess to install build dependencies
Collecting setuptools>=42
Using cached setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)
Collecting pybind11>=2.10
Using cached pybind11-2.11.1-py3-none-any.whl.metadata (9.5 kB)
Collecting cmake>=3.24
Using cached cmake-3.27.9-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (6.3 kB)
Using cached setuptools-69.0.2-py3-none-any.whl (819 kB)
Using cached pybind11-2.11.1-py3-none-any.whl (227 kB)
Using cached cmake-3.27.9-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (47.4 MB)
Installing collected packages: cmake, setuptools, pybind11
Successfully installed cmake-3.27.9 pybind11-2.11.1 setuptools-69.0.2
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Getting requirements to build editable
running egg_info
writing python/mlx.egg-info/PKG-INFO
writing dependency_links to python/mlx.egg-info/dependency_links.txt
writing requirements to python/mlx.egg-info/requires.txt
writing top-level names to python/mlx.egg-info/top_level.txt
reading manifest file 'python/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'python/mlx.egg-info/SOURCES.txt'
Getting requirements to build editable ... done
Running command pip subprocess to install backend dependencies
Collecting wheel
Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Using cached wheel-0.42.0-py3-none-any.whl (65 kB)
Installing collected packages: wheel
Successfully installed wheel-0.42.0
Installing backend dependencies ... done
Running command Preparing editable metadata (pyproject.toml)
running dist_info
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info
writing /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/dependency_links.txt
writing requirements to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/requires.txt
writing top-level names to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/top_level.txt
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx.egg-info/SOURCES.txt'
creating '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-fsvy8jnz/mlx-0.0.4.dev2023128+2e126ae.dist-info'
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: mlx
Running command Building editable for mlx (pyproject.toml)
running editable_wheel
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info
writing /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/dependency_links.txt
writing requirements to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/requires.txt
writing top-level names to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/top_level.txt
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx.egg-info/SOURCES.txt'
creating '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx-0.0.4.dev2023128+2e126ae.dist-info'
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-rtfitlqw/.tmp-_dmmxv07/mlx-0.0.4.dev2023128+2e126ae.dist-info/WHEEL
running build_py
running build_ext
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building METAL sources
-- Building with SDK for MacOS version 14.0
-- Accelerate found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/Accelerate.framework
-- Building Python bindings.
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.5") found components: Interpreter Development Development.Module Development.Embed
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Found pybind11: /opt/homebrew/include (found version "2.11.1")
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp6kee9x3f.build-temp/mlx.core
[ 1%] Building arange.air
[ 2%] Building scan.air
[ 4%] Building unary.air
[ 5%] Building random.air
[ 6%] Building softmax.air
[ 8%] Building gemv.air
[ 9%] Building binary.air
[ 12%] Building sort.air
[ 12%] Building conv.air
[ 13%] Building indexing.air
[ 16%] Building gemm.air
[ 16%] Building arg_reduce.air
[ 19%] Building reduce.air
[ 19%] Building copy.air
[ 20%] Building mlx.metallib
[ 20%] Built target mlx-metallib
[ 21%] Building CXX object CMakeFiles/mlx.dir/mlx/allocator.cpp.o
[ 23%] Building CXX object CMakeFiles/mlx.dir/mlx/graph_utils.cpp.o
[ 26%] Building CXX object CMakeFiles/mlx.dir/mlx/load.cpp.o
[ 26%] Building CXX object CMakeFiles/mlx.dir/mlx/array.cpp.o
[ 27%] Building CXX object CMakeFiles/mlx.dir/mlx/dtype.cpp.o
[ 28%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/conv.cpp.o
[ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/device.cpp.o
[ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/fft.cpp.o
[ 34%] Building CXX object CMakeFiles/mlx.dir/mlx/ops.cpp.o
[ 34%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/primitives.cpp.o
[ 36%] Building CXX object CMakeFiles/mlx.dir/mlx/scheduler.cpp.o
[ 36%] Building CXX object CMakeFiles/mlx.dir/mlx/primitives.cpp.o
[ 38%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/arg_reduce.cpp.o
[ 41%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/binary.cpp.o
[ 41%] Building CXX object CMakeFiles/mlx.dir/mlx/utils.cpp.o
[ 42%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/fft.cpp.o
[ 45%] Building CXX object CMakeFiles/mlx.dir/mlx/random.cpp.o
[ 47%] Building CXX object CMakeFiles/mlx.dir/mlx/transforms.cpp.o
[ 47%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/copy.cpp.o
[ 45%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/scan.cpp.o
[ 49%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/erf.cpp.o
[ 50%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/softmax.cpp.o
[ 52%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/reduce.cpp.o
[ 53%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/sort.cpp.o
[ 54%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/threefry.cpp.o
[ 56%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/load.cpp.o
[ 58%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/indexing.cpp.o
[ 58%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/conv.cpp.o
[ 60%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/softmax.cpp.o
[ 61%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/matmul.cpp.o
[ 63%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/primitives.cpp.o
[ 64%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/reduce.cpp.o
[ 65%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/allocator.cpp.o
[ 67%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/conv.cpp.o
[ 68%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/copy.cpp.o
[ 69%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/fft.cpp.o
[ 71%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/indexing.cpp.o
[ 72%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/metal.cpp.o
[ 73%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/device.cpp.o
[ 75%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/matmul.cpp.o
[ 76%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/primitives.cpp.o
[ 78%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/scan.cpp.o
[ 79%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/sort.cpp.o
[ 80%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/reduce.cpp.o
[ 82%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/softmax.cpp.o
[ 83%] Linking CXX shared library libmlx.dylib
[ 83%] Built target mlx
[ 84%] Building CXX object python/src/CMakeFiles/core.dir/array.cpp.o
[ 87%] Building CXX object python/src/CMakeFiles/core.dir/device.cpp.o
[ 87%] Building CXX object python/src/CMakeFiles/core.dir/fft.cpp.o
[ 90%] Building CXX object python/src/CMakeFiles/core.dir/metal.cpp.o
[ 90%] Building CXX object python/src/CMakeFiles/core.dir/ops.cpp.o
[ 91%] Building CXX object python/src/CMakeFiles/core.dir/mlx.cpp.o
[ 93%] Building CXX object python/src/CMakeFiles/core.dir/indexing.cpp.o
[ 94%] Building CXX object python/src/CMakeFiles/core.dir/load.cpp.o
[ 95%] Building CXX object python/src/CMakeFiles/core.dir/stream.cpp.o
[ 97%] Building CXX object python/src/CMakeFiles/core.dir/random.cpp.o
[ 98%] Building CXX object python/src/CMakeFiles/core.dir/transforms.cpp.o
[100%] Linking CXX shared module /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmpd8zis5so.build-lib/mlx/core.cpython-311-darwin.so
[100%] Built target core
Install the project...
-- Install configuration: "Release"
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 156, in run
self._create_wheel_file(bdist_wheel)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 345, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 268, in _run_build_commands
self._run_build_subcommands()
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 295, in _run_build_subcommands
self.run_command(name)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
super().run_command(command)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 110, in run
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run
self.copy_extensions_to_source()
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 112, in copy_extensions_to_source
self.copy_file(regular_file, inplace_file, level=self.verbose)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 350, in copy_file
return file_util.copy_file(
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 115, in copy_file
raise DistutilsFileError(
distutils.errors.DistutilsFileError: can't copy '/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmpd8zis5so.build-lib/mlx/core.cpython-310-darwin.so': doesn't exist or not a regular file
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py:988: _DebuggingTips: Problem in editable installation.
!!
********************************************************************************
An error happened while installing `mlx` in editable mode.
The following steps are recommended to help debug this problem:
- Try to install the project normally, without using the editable mode.
Does the error still persist?
(If it does, try fixing the problem before attempting the editable mode).
- If you are using binary extensions, make sure you have all OS-level
dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
- Try the latest version of setuptools (maybe the error was already fixed).
- If you (or your project dependencies) are using any setuptools extension
or customization, make sure they support the editable mode.
After following the steps above, if the problem still persists and
you think this is related to how setuptools handles editable installations,
please submit a reproducible example
(see https://stackoverflow.com/help/minimal-reproducible-example) to:
https://github.com/pypa/setuptools/issues
See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
********************************************************************************
!!
cmd_obj.run()
error: can't copy '/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmpd8zis5so.build-lib/mlx/core.cpython-310-darwin.so': doesn't exist or not a regular file
error: subprocess-exited-with-error
× Building editable for mlx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/homebrew/opt/[email protected]/bin/python3.10 /opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp495hpbas
cwd: /Users/lucasste/Documents/mlx
Building editable for mlx (pyproject.toml) ... error
ERROR: Failed building editable for mlx
Failed to build mlx
ERROR: Could not build wheels for mlx, which is required to install pyproject.toml-based projects
from mlx.
Right, I see what happened here
It used python 3.11 to link to Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.5") found components: Interpreter Development Development.Module Development.Embed
while you were building using python 3.10 /opt/homebrew/opt/[email protected]/bin/python3.10
Could try building one more time using these commands:
rm -rf build
env CMAKE_BUILD_PARALLEL_LEVEL="" CMAKE_ARGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/homebrew/opt/[email protected]/bin/python3.10" pip install -e . -v
from mlx.
No success yet:
env CMAKE_BUILD_PARALLEL_LEVEL="" CMAKE_ARGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/homebrew/opt/[email protected]/bin/python3.10" pip install -e . -v
Using pip 23.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
Obtaining file:///Users/lucasste/Documents/mlx
Running command pip subprocess to install build dependencies
Collecting setuptools>=42
Using cached setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)
Collecting pybind11>=2.10
Using cached pybind11-2.11.1-py3-none-any.whl.metadata (9.5 kB)
Collecting cmake>=3.24
Using cached cmake-3.27.9-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (6.3 kB)
Using cached setuptools-69.0.2-py3-none-any.whl (819 kB)
Using cached pybind11-2.11.1-py3-none-any.whl (227 kB)
Using cached cmake-3.27.9-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (47.4 MB)
Installing collected packages: cmake, setuptools, pybind11
Successfully installed cmake-3.27.9 pybind11-2.11.1 setuptools-69.0.2
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Getting requirements to build editable
running egg_info
writing python/mlx.egg-info/PKG-INFO
writing dependency_links to python/mlx.egg-info/dependency_links.txt
writing requirements to python/mlx.egg-info/requires.txt
writing top-level names to python/mlx.egg-info/top_level.txt
reading manifest file 'python/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'python/mlx.egg-info/SOURCES.txt'
Getting requirements to build editable ... done
Running command pip subprocess to install backend dependencies
Collecting wheel
Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Using cached wheel-0.42.0-py3-none-any.whl (65 kB)
Installing collected packages: wheel
Successfully installed wheel-0.42.0
Installing backend dependencies ... done
Running command Preparing editable metadata (pyproject.toml)
running dist_info
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info
writing /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/dependency_links.txt
writing requirements to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/requires.txt
writing top-level names to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/top_level.txt
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx.egg-info/SOURCES.txt'
creating '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-modern-metadata-ta3_dl5b/mlx-0.0.4.dev2023129+2e126ae.dist-info'
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: mlx
Running command Building editable for mlx (pyproject.toml)
running editable_wheel
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info
writing /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/dependency_links.txt
writing requirements to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/requires.txt
writing top-level names to /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/top_level.txt
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx.egg-info/SOURCES.txt'
creating '/private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx-0.0.4.dev2023129+2e126ae.dist-info'
creating /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/pip-wheel-8onazskb/.tmp-rw77pr1e/mlx-0.0.4.dev2023129+2e126ae.dist-info/WHEEL
running build_py
running build_ext
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building METAL sources
-- Building with SDK for MacOS version 14.0
-- Accelerate found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/Accelerate.framework
-- Building Python bindings.
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.5") found components: Interpreter Development Development.Module Development.Embed
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Found pybind11: /opt/homebrew/include (found version "2.11.1")
-- Configuring done (8.9s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
PYTHON_EXECUTABLE
-- Build files have been written to: /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp7azim9hy.build-temp/mlx.core
[ 1%] Building arange.air
[ 2%] Building softmax.air
[ 4%] Building random.air
[ 5%] Building unary.air
[ 6%] Building reduce.air
[ 9%] Building gemv.air
[ 9%] Building indexing.air
[ 10%] Building sort.air
[ 12%] Building gemm.air
[ 13%] Building scan.air
[ 15%] Building conv.air
[ 16%] Building copy.air
[ 17%] Building binary.air
[ 19%] Building arg_reduce.air
[ 20%] Building mlx.metallib
[ 20%] Built target mlx-metallib
[ 23%] Building CXX object CMakeFiles/mlx.dir/mlx/primitives.cpp.o
[ 23%] Building CXX object CMakeFiles/mlx.dir/mlx/load.cpp.o
[ 24%] Building CXX object CMakeFiles/mlx.dir/mlx/array.cpp.o
[ 27%] Building CXX object CMakeFiles/mlx.dir/mlx/device.cpp.o
[ 27%] Building CXX object CMakeFiles/mlx.dir/mlx/allocator.cpp.o
[ 28%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/binary.cpp.o
[ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/fft.cpp.o
[ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/arg_reduce.cpp.o
[ 32%] Building CXX object CMakeFiles/mlx.dir/mlx/ops.cpp.o
[ 34%] Building CXX object CMakeFiles/mlx.dir/mlx/transforms.cpp.o
[ 35%] Building CXX object CMakeFiles/mlx.dir/mlx/scheduler.cpp.o
[ 36%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/fft.cpp.o
[ 38%] Building CXX object CMakeFiles/mlx.dir/mlx/dtype.cpp.o
[ 39%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/copy.cpp.o
[ 41%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/sort.cpp.o
[ 42%] Building CXX object CMakeFiles/mlx.dir/mlx/graph_utils.cpp.o
[ 43%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/reduce.cpp.o
[ 45%] Building CXX object CMakeFiles/mlx.dir/mlx/random.cpp.o
[ 46%] Building CXX object CMakeFiles/mlx.dir/mlx/utils.cpp.o
[ 47%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/threefry.cpp.o
[ 49%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/scan.cpp.o
[ 50%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/conv.cpp.o
[ 52%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/softmax.cpp.o
[ 54%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/indexing.cpp.o
[ 54%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/primitives.cpp.o
[ 56%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/load.cpp.o
[ 57%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/common/erf.cpp.o
[ 58%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/device.cpp.o
[ 60%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/reduce.cpp.o
[ 61%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/matmul.cpp.o
[ 63%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/primitives.cpp.o
[ 64%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/indexing.cpp.o
[ 65%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/sort.cpp.o
[ 67%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/copy.cpp.o
[ 68%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/softmax.cpp.o
[ 69%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/allocator.cpp.o
[ 71%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/fft.cpp.o
[ 72%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/softmax.cpp.o
[ 73%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/conv.cpp.o
[ 75%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/metal.cpp.o
[ 76%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/accelerate/conv.cpp.o
[ 78%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/primitives.cpp.o
[ 79%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/matmul.cpp.o
[ 80%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/scan.cpp.o
[ 82%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/reduce.cpp.o
[ 83%] Linking CXX shared library libmlx.dylib
[ 83%] Built target mlx
[ 84%] Building CXX object python/src/CMakeFiles/core.dir/array.cpp.o
[ 86%] Building CXX object python/src/CMakeFiles/core.dir/mlx.cpp.o
[ 89%] Building CXX object python/src/CMakeFiles/core.dir/fft.cpp.o
[ 91%] Building CXX object python/src/CMakeFiles/core.dir/ops.cpp.o
[ 91%] Building CXX object python/src/CMakeFiles/core.dir/metal.cpp.o
[ 89%] Building CXX object python/src/CMakeFiles/core.dir/indexing.cpp.o
[ 93%] Building CXX object python/src/CMakeFiles/core.dir/device.cpp.o
[ 94%] Building CXX object python/src/CMakeFiles/core.dir/stream.cpp.o
[ 95%] Building CXX object python/src/CMakeFiles/core.dir/load.cpp.o
[ 98%] Building CXX object python/src/CMakeFiles/core.dir/transforms.cpp.o
[ 98%] Building CXX object python/src/CMakeFiles/core.dir/random.cpp.o
[100%] Linking CXX shared module /private/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp3ppc_lr2.build-lib/mlx/core.cpython-311-darwin.so
[100%] Built target core
Install the project...
-- Install configuration: "Release"
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 156, in run
self._create_wheel_file(bdist_wheel)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 345, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 268, in _run_build_commands
self._run_build_subcommands()
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 295, in _run_build_subcommands
self.run_command(name)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
super().run_command(command)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 110, in run
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run
self.copy_extensions_to_source()
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 112, in copy_extensions_to_source
self.copy_file(regular_file, inplace_file, level=self.verbose)
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 350, in copy_file
return file_util.copy_file(
File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 115, in copy_file
raise DistutilsFileError(
distutils.errors.DistutilsFileError: can't copy '/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp3ppc_lr2.build-lib/mlx/core.cpython-310-darwin.so': doesn't exist or not a regular file
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py:988: _DebuggingTips: Problem in editable installation.
!!
********************************************************************************
An error happened while installing `mlx` in editable mode.
The following steps are recommended to help debug this problem:
- Try to install the project normally, without using the editable mode.
Does the error still persist?
(If it does, try fixing the problem before attempting the editable mode).
- If you are using binary extensions, make sure you have all OS-level
dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
- Try the latest version of setuptools (maybe the error was already fixed).
- If you (or your project dependencies) are using any setuptools extension
or customization, make sure they support the editable mode.
After following the steps above, if the problem still persists and
you think this is related to how setuptools handles editable installations,
please submit a reproducible example
(see https://stackoverflow.com/help/minimal-reproducible-example) to:
https://github.com/pypa/setuptools/issues
See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
********************************************************************************
!!
cmd_obj.run()
error: can't copy '/var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmp3ppc_lr2.build-lib/mlx/core.cpython-310-darwin.so': doesn't exist or not a regular file
error: subprocess-exited-with-error
× Building editable for mlx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/homebrew/opt/[email protected]/bin/python3.10 /opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /var/folders/b8/6mjky64x0kn0v0s2l_4_pwm00000gn/T/tmpdvmib18n
cwd: /Users/lucasste/Documents/mlx
Building editable for mlx (pyproject.toml) ... error
ERROR: Failed building editable for mlx
Failed to build mlx
ERROR: Could not build wheels for mlx, which is required to install pyproject.toml-based projects
from mlx.
@LucasSte I was having the same issue. Here's how I was able to fix it:
I added the following lines to my CMakeList.txt
# Set the specific Python version
set(PYTHON_EXECUTABLE "/path/to/python/exe")
set(PYTHON_LIBRARY "/path/to/python/lib")
set(PYTHON_INCLUDE_DIR "/path/to/python/include/dir")
And changed the following line in the CMakeList.txt
# Before
find_package(Python COMPONENTS Interpreter Development)
# After
find_package(PYTHON_EXECUTABLE COMPONENTS Interpreter Development)
I got the Python directories by running the following script:
import sysconfig
import sys
print("Python Executable:", sys.executable)
print("Python Library:", sysconfig.get_path("stdlib"))
print("Python Include Dir:", sysconfig.get_path("include"))
And then install!
env CMAKE_BUILD_PARALLEL_LEVEL="" pip install -e .
There's probably a way to do it all in-line, but I hope this helps!
from mlx.
Related Issues (20)
- Does mlx support Apple m chip npu HOT 1
- `sorted` and `argSort` don't work for split arrays HOT 1
- Large ops with multiprocess fail with internal error HOT 3
- [Feature Request] support dtype in mlx.core's module initialization HOT 1
- [BUG] NaN when using max reduction + compile HOT 1
- [Feature] Metal inverse (`mx.linalg.inv`) HOT 4
- [BUG] Missing types HOT 6
- [BUG] Typo: traditinoal -> traditional
- [Feature] cross product HOT 1
- Sample packing using mx.fast.scaled_dot_product_attention? HOT 1
- [Feature] Make APIs non-blocking HOT 3
- [Feature] Enable Metal argsort, sort for > 2M elements along an axis
- [Feature] searchsorted HOT 4
- [Feature Request] Support convolution backward for groups > 1. HOT 1
- [BUG] 'mlx.core.linalg.qr' doesn't work on gpu, there's an abort. HOT 1
- [BUG] HOT 8
- [BUG] type stubs are missing for python 3.9 and 3.10 distributions
- [Feature Request] Adding option to follow PyTorch API in GELU initalization HOT 1
- [BUG] Segmentation fault while running custom operations HOT 4
- Memory Leakage Issue in MLX 0.16 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlx.