Open Arseni1919 opened 1 month ago
If installed locally the following error arises:
(base) ➜ MAgent2 git:(main) pip install .
Processing /Users/perchik/PycharmProjects/MAgent2
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pettingzoo>=1.23.1
Downloading pettingzoo-1.24.3-py3-none-any.whl (847 kB)
|████████████████████████████████| 847 kB 1.0 MB/s
Collecting pygame>=2.1.0
Downloading pygame-2.6.1-cp38-cp38-macosx_10_9_x86_64.whl (13.0 MB)
|████████████████████████████████| 13.0 MB 49.5 MB/s
Collecting numpy<2.0,>=1.21.0
Downloading numpy-1.24.4-cp38-cp38-macosx_10_9_x86_64.whl (19.8 MB)
|████████████████████████████████| 19.8 MB 141.9 MB/s
Collecting gymnasium>=0.28.0
Downloading gymnasium-1.0.0-py3-none-any.whl (958 kB)
|████████████████████████████████| 958 kB 42.7 MB/s
Requirement already satisfied: importlib-metadata>=4.8.0 in /Users/perchik/opt/anaconda3/lib/python3.8/site-packages (from gymnasium>=0.28.0->pettingzoo>=1.23.1->magent2==0.3.3) (7.0.0)
Collecting farama-notifications>=0.0.1
Downloading Farama_Notifications-0.0.4-py3-none-any.whl (2.5 kB)
Collecting typing-extensions>=4.3.0
Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Requirement already satisfied: cloudpickle>=1.2.0 in /Users/perchik/opt/anaconda3/lib/python3.8/site-packages (from gymnasium>=0.28.0->pettingzoo>=1.23.1->magent2==0.3.3) (2.0.0)
Requirement already satisfied: zipp>=0.5 in /Users/perchik/opt/anaconda3/lib/python3.8/site-packages (from importlib-metadata>=4.8.0->gymnasium>=0.28.0->pettingzoo>=1.23.1->magent2==0.3.3) (3.4.1)
Building wheels for collected packages: magent2
Building wheel for magent2 (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/perchik/opt/anaconda3/bin/python /Users/perchik/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/tmp7pxl25bc
cwd: /private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx
Complete output (294 lines):
running bdist_wheel
running build
running build_py
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/c_lib.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/render.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/gridworld.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/utility.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
copying magent2/environment.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/battlefield_v5.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/combined_arms_v6.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/magent_env.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/adversarial_pursuit_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/gather_v5.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/battle_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/tiger_deer_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin
copying magent2/builtin/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battle
copying magent2/environments/battle/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battle
copying magent2/environments/battle/battle.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battle
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battlefield
copying magent2/environments/battlefield/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battlefield
copying magent2/environments/battlefield/battlefield.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/battlefield
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/gather
copying magent2/environments/gather/gather.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/gather
copying magent2/environments/gather/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/gather
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/tiger_deer
copying magent2/environments/tiger_deer/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/tiger_deer
copying magent2/environments/tiger_deer/tiger_deer.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/tiger_deer
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/combined_arms
copying magent2/environments/combined_arms/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/combined_arms
copying magent2/environments/combined_arms/combined_arms.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/combined_arms
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/adversarial_pursuit
copying magent2/environments/adversarial_pursuit/adversarial_pursuit.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/adversarial_pursuit
copying magent2/environments/adversarial_pursuit/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments/adversarial_pursuit
creating build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
copying magent2/builtin/config/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
copying magent2/builtin/config/double_attack.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
copying magent2/builtin/config/forest.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
copying magent2/builtin/config/pursuit.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
copying magent2/builtin/config/battle.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/builtin/config
running egg_info
writing magent2.egg-info/PKG-INFO
writing dependency_links to magent2.egg-info/dependency_links.txt
writing requirements to magent2.egg-info/requires.txt
writing top-level names to magent2.egg-info/top_level.txt
reading manifest file 'magent2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'magent2/config'
warning: no files found matching '*' under directory 'magent2/scenarios'
warning: no files found matching '*.dylib'
warning: no files found matching '*.dll'
warning: no files found matching '*.so'
adding license file 'LICENSE'
writing manifest file 'magent2.egg-info/SOURCES.txt'
copying magent2/environments/battlefield_v5.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/combined_arms_v6.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/magent_env.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/adversarial_pursuit_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/gather_v5.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/battle_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
copying magent2/environments/tiger_deer_v4.py -> build/lib.macosx-10.9-x86_64-cpython-38/magent2/environments
running build_ext
-- The C compiler identification is Clang 18.1.7
-- The CXX compiler identification is Clang 18.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (1.8s)
-- Generating done (0.0s)
-- Build files have been written to: /private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/temp.macosx-10.9-x86_64-cpython-38
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx
CMakeLists.txt
CODE_OF_CONDUCT.rst
LICENSE
MANIFEST.in
MAgent2-text.png
README.md
build
docs
magent-graph-1.gif
magent-graph-2.gif
magent2
magent2.egg-info
pyproject.toml
setup.py
src
tests
[ 5%] Building CXX object CMakeFiles/magent.dir/src/gridworld/Map.cc.o
[ 10%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/Map.cc.o
[ 15%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/GridWorld.cc.o
[ 25%] Building CXX object CMakeFiles/magent.dir/src/gridworld/GridWorld.cc.o
[ 30%] Building CXX object CMakeFiles/magent.dir/src/gridworld/RenderGenerator.cc.o
[ 25%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/AgentType.cc.o
[ 35%] Building CXX object CMakeFiles/magent.dir/src/gridworld/AgentType.cc.o
[ 40%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/RenderGenerator.cc.o
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:180:9: warning: variable 'p_view_inner' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
180 | default:
| ^~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:184:24: note: uninitialized use occurs here
184 | int start_inner = *p_view_inner;
| ^~~~~~~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:161:22: note: initialize the variable 'p_view_inner' to silence this warning
161 | int *p_view_inner, *p_view_outer;
| ^
| = nullptr
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:622:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
622 | printf("="); puts("");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:621:5: note: previous statement is here
621 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:625:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
625 | printf("%2d ", x); puts("");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:624:5: note: previous statement is here
624 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:673:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
673 | printf("="); puts("\n");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:672:5: note: previous statement is here
672 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:180:9: warning: variable 'p_view_inner' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
180 | default:
| ^~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:184:24: note: uninitialized use occurs here
184 | int start_inner = *p_view_inner;
| ^~~~~~~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:161:22: note: initialize the variable 'p_view_inner' to silence this warning
161 | int *p_view_inner, *p_view_outer;
| ^
| = nullptr
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:622:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
622 | printf("="); puts("");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:621:5: note: previous statement is here
621 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:625:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
625 | printf("%2d ", x); puts("");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:624:5: note: previous statement is here
624 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:673:29: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
673 | printf("="); puts("\n");
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/Map.cc:672:5: note: previous statement is here
672 | for (int x = 0; x < w; x++)
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/GridWorld.cc:644:13: warning: variable 'dead_ct' set but not used [-Wunused-but-set-variable]
644 | int dead_ct = 0;
| ^
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/GridWorld.cc:644:13: warning: variable 'dead_ct' set but not used [-Wunused-but-set-variable]
644 | int dead_ct = 0;
| ^
[ 45%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/RewardEngine.cc.o
[ 50%] Building CXX object CMakeFiles/magent.dir/src/gridworld/RewardEngine.cc.o
4 warnings generated.
4 warnings generated.
[ 55%] Building CXX object CMakeFiles/magent.dir/src/gridworld/test.cc.o
[ 60%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/test.cc.o
[ 65%] Building CXX object CMakeFiles/testlib.dir/src/runtime_api.cc.o
[ 70%] Building CXX object CMakeFiles/magent.dir/src/runtime_api.cc.o
[ 75%] Building CXX object CMakeFiles/testlib.dir/src/temp_c_booster.cc.o
[ 80%] Building CXX object CMakeFiles/testlib.dir/src/utility/utility.cc.o
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:366:9: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
366 | default:
| ^~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:370:12: note: uninitialized use occurs here
370 | return ret;
| ^~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:217:13: note: initialize the variable 'ret' to silence this warning
217 | bool ret;
| ^
| = false
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:366:9: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
366 | default:
| ^~~~~~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:370:12: note: uninitialized use occurs here
370 | return ret;
| ^~~
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/src/gridworld/RewardEngine.cc:217:13: note: initialize the variable 'ret' to silence this warning
217 | bool ret;
| ^
| = false
1 warning generated.
1 warning generated.
[ 85%] Building CXX object CMakeFiles/magent.dir/src/temp_c_booster.cc.o
[ 90%] Building CXX object CMakeFiles/magent.dir/src/utility/utility.cc.o
1 warning generated.
1 warning generated.
[ 95%] Linking CXX executable /private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/lib.macosx-10.9-x86_64-cpython-38/magent2/testlib
[100%] Linking CXX shared library /private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/lib.macosx-10.9-x86_64-cpython-38/magent2/libmagent.dylib
ld: warning: ignoring file '/opt/homebrew/Cellar/llvm/18.1.7/lib/libunwind.1.0.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
"__Unwind_Resume", referenced from:
magent::gridworld::AgentType::AgentType(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, char const**, float*, bool) in AgentType.cc.o
magent::gridworld::AgentType::AgentType(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, char const**, float*, bool) in AgentType.cc.o
magent::gridworld::CircleRange::CircleRange(float, float, int) in AgentType.cc.o
magent::gridworld::SectorRange::SectorRange(float, float, int) in AgentType.cc.o
magent::utility::Logger<true>::Logger(char const*, int) in AgentType.cc.o
magent::utility::Logger<true>::Logger(char const*, int) in AgentType.cc.o
std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:ne180100]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in AgentType.cc.o
...
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/lib.macosx-10.9-x86_64-cpython-38/magent2/testlib] Error 1
make[1]: *** [CMakeFiles/testlib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: warning: ignoring file '/opt/homebrew/Cellar/llvm/18.1.7/lib/libunwind.1.0.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
"__Unwind_Resume", referenced from:
magent::gridworld::AgentType::AgentType(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, char const**, float*, bool) in AgentType.cc.o
magent::gridworld::AgentType::AgentType(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, char const**, float*, bool) in AgentType.cc.o
magent::gridworld::CircleRange::CircleRange(float, float, int) in AgentType.cc.o
magent::gridworld::SectorRange::SectorRange(float, float, int) in AgentType.cc.o
magent::utility::Logger<true>::Logger(char const*, int) in AgentType.cc.o
magent::utility::Logger<true>::Logger(char const*, int) in AgentType.cc.o
std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:ne180100]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in AgentType.cc.o
...
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/lib.macosx-10.9-x86_64-cpython-38/magent2/libmagent.dylib] Error 1
make[1]: *** [CMakeFiles/magent.dir/all] Error 2
make: *** [all] Error 2
magent2.libmagent
/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/lib.macosx-10.9-x86_64-cpython-38/magent2
Traceback (most recent call last):
File "/Users/perchik/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Users/perchik/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/perchik/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 434, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', metadata_directory])
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 422, in _build
return self._build_with_temp_dir(
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 115, in <module>
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 991, in run_command
super().run_command(command)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/command/bdist_wheel.py", line 407, in run
self.run_command("build")
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 991, in run_command
super().run_command(command)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 991, in run_command
super().run_command(command)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-build-env-_7ha0ub0/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 84, in build_extensions
File "/Users/perchik/opt/anaconda3/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-C', '/private/var/folders/sd/9sq_fhy14jvdmsklx7t3snqw0000gn/T/pip-req-build-4se3arzx/build/temp.macosx-10.9-x86_64-cpython-38', '-j', '8']' returned non-zero exit status 2.
----------------------------------------
ERROR: Failed building wheel for magent2
Failed to build magent2
ERROR: Could not build wheels for magent2 which use PEP 517 and cannot be installed directly
Hi @Arseni1919,
Thank you for bringing this issue to our attention. The problem appears to be that magent2 is trying to build for the x86_64 architecture, but your MacBook with an M3 (or M1) chip uses the ARM-based arm64 architecture. This mismatch leads to the build failure you're experiencing.
A potential fix includes
Checking your Python Architecture
python -c "import platform; print(platform.platform())"
Set Environment Variables for ARM Architecture:
export ARCHFLAGS="-arch arm64" export CMAKE_OSX_ARCHITECTURES=arm64
Reinstall magent2
pip install magent2
Let me know if this helps!
Somehow I installed it with a classical venv environment. The conda environment is not compatible with MAgents2 in my case.
I haave Macbook with M3 and, currently, I am notable to install the package. Attaching the run below. The same issue I had with Macbook M1 chip. Conda environment. macOS version: 14.6 (23G80) Do you know what I need to do in order to install it? Thank you in advance.