-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty building on macOS #8421
Comments
As a hack, can you check if the build works if you change the extension of all the |
That worked! Thank you 馃槃 |
Although now building successfully, all the tests in
I did install I'm seeing a lot of failures due to |
馃悰 Describe the bug
I am having difficulty building from source on macOS with an M1 chip. Here is what I've tried:
conda create -n .torchvision_venv python=3.11
conda activate .torchvision_venv
conda install pytorch-nightly::pytorch -c pytorch-nightly
git clone https://github.com/pytorch/vision.git
cd vision
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py develop
This results in the following:
Error output
If I try to target a higher version of macOS (to combat the 'is unavailable: introduced in macOS '), e.g.
_TARGET=11.0
:MACOSX_DEPLOYMENT_TARGET=11.0 CC=clang CXX=clang++ python setup.py develop
I get an error about 'error: invalid argument '-std=c++17' not allowed with 'C')' when trying to use 'dgif_lib.c':
MACOSX_DEPLOYMENT_TARGET=11.0
Error outputIf I try straight
python setup.py develop
I get a similar errorpython setup.py develop
Error outputI have tried a couple other flags (e.g.
USE_METAL=1
,USE_CUDA=0
) but am getting the same errors.Any help will be greatly appreciated!
Versions
Collecting environment information...
PyTorch version: 2.4.0.dev20240510
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.4.1 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: Could not collect
Libc version: N/A
Python version: 3.11.9 (main, Apr 19 2024, 11:43:47) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-14.4.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M1 Pro
Versions of relevant libraries:
[pip3] torch==2.4.0.dev20240510
[conda] pytorch 2.4.0.dev20240510 py3.11_0 pytorch-nightly
The text was updated successfully, but these errors were encountered: