Comments (5)
python3 setup.py install
Sorry for the delay on this issue, but I think this is now fixed. Editable mode (pip install -e .
) still has some issues due to CMake which I'm not well versed enough to be able to fix, but running python3 setup.py install
should work now. Installing locally via pip install .
also works.
If you are interested in helping out further we would love to have extra hands helping with making proper testing to ensure things like this work (on other farama projects our CI installs on different python versions on linux and mac osx to ensure things work as intended). This project doesn't currently have any testing through pytest
either, but that requires domain knowledge of the library, which I unfortunately do not have, and the other previous maintainers haven't had much time to get around to it.
from magent2.
I am getting the same issue on linux with pip install magent2
command
pip version: 23.1.2
linux version: Ubuntu 20.04.4 LTS
Collecting magent2
Using cached magent2-0.3.2.tar.gz (4.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
Traceback (most recent call last):
File "/home/yungisimon/anaconda3/envs/Farama_Hetero/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/yungisimon/anaconda3/envs/Farama_Hetero/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yungisimon/anaconda3/envs/Farama_Hetero/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ycn_xn10/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ycn_xn10/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-ycn_xn10/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 116, in <module>
File "<string>", line 21, in get_version
FileNotFoundError: [Errno 2] No such file or directory: 'magent2/__init__.py'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
from magent2.
failed to compile from source, with python3 setup.py install
as well.
from magent2.
python3 setup.py install
Sorry for the delay on this issue, but I think this is now fixed. Editable mode (
pip install -e .
) still has some issues due to CMake which I'm not well versed enough to be able to fix, but runningpython3 setup.py install
should work now. Installing locally viapip install .
also works.If you are interested in helping out further we would love to have extra hands helping with making proper testing to ensure things like this work (on other farama projects our CI installs on different python versions on linux and mac osx to ensure things work as intended). This project doesn't currently have any testing through
pytest
either, but that requires domain knowledge of the library, which I unfortunately do not have, and the other previous maintainers haven't had much time to get around to it.
I installed successfully using pip install .
, but still got the following error message when executing from magent2.environments import battle_v4
:
from magent2.environments import battle_v4
Traceback (most recent call last):
File "", line 1, in
File "/Users/xxx/CodeProject/MARL/MAgent2/magent2/init.py", line 1, in
from magent2 import gridworld, utility
File "/Users/xxx/CodeProject/MARL/MAgent2/magent2/gridworld.py", line 10, in
from magent2.c_lib import _LIB, as_float_c_array, as_int32_c_array
File "/Users/xxx/CodeProject/MARL/MAgent2/magent2/c_lib.py", line 43, in
_LIB = _load_lib()
File "/Users/xxx/CodeProject/MARL/MAgent2/magent2/c_lib.py", line 22, in _load_lib
lib = ctypes.CDLL(path_to_so_file, ctypes.RTLD_GLOBAL)
File "/Users/xxx/anaconda3/envs/marl/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/xxx/CodeProject/MARL/MAgent2/magent2/libmagent.dylib, 0x000A): tried: '/Users/xxx/CodeProject/MARL/MAgent2/magent2/libmagent.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/xxx/CodeProject/MARL/MAgent2/magent2/libmagent.dylib' (no such file), '/Users/xxx/CodeProject/MARL/MAgent2/magent2/libmagent.dylib' (no such file)
I wonder if there are any solutions to this? thx.
from magent2.
Again I’m not a domain expert but it appears that the installation process involves copying the “libmagent” file in the build folder, explained here:
Line 15 in d4ec94d
MAgent2/.github/workflows/gh-pages.yml
Line 27 in d4ec94d
It seems that that libmagent file has a different extension (.so) on Linux and .dylib on MacOS, as seen here:
Line 15 in d4ec94d
TLDR look for that file it says is missing, and copy it to the place where it is looking for it.
I think this should be something that can be fixed in the setup.py or elsewhere, but maybe it’s a manual process. I will leave fixing this to someone better versed in c++ as I am quite unfamiliar. FWIW the way I found those links above was just searching this repo for the file in the error, if in doubt you can usually figure things like that out in the same way yourself if someone like me isn’t able to respond quickly
from magent2.
Related Issues (15)
- Prebuild mac wheels once Github Actions supports M1
- ModuleNotFoundError: No module named 'magent2.environments' HOT 4
- Render freeze when window lose focus. HOT 1
- Installation issues on Linux HOT 1
- Early Termination
- Editable install and local install issues HOT 1
- TypeError: reset_wait() got an unexpected keyword argument 'seed'
- Is there any pre-trained model or scripted AI?
- Could this be installed on window? HOT 1
- env.reset() crashed in basic usage example HOT 4
- How do I customize the environment in this?
- The problem of tiger_deer_v4 scenario
- env.reset() HOT 3
- How to know if an agent is in another's attack range? HOT 1
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 magent2.