Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows install multi_agent_ale_py fail in python-3.9.13 #17

Open
xiezhipeng-git opened this issue Jan 30, 2023 · 4 comments
Open

windows install multi_agent_ale_py fail in python-3.9.13 #17

xiezhipeng-git opened this issue Jan 30, 2023 · 4 comments

Comments

@xiezhipeng-git
Copy link

PS E:\study\machineStudy\project\rlFrame\rl_frame> pip install multi_agent_ale_py
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting multi_agent_ale_py
Downloading http://mirrors.aliyun.com/pypi/packages/8a/a1/92127ae8088e45a90a04c5a334db8ddac71815a968884b663bc53416cff6/multi-agent-ale-py-0.1.11.tar.gz (551 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 552.0/552.0 kB 84.8 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from multi_agent_ale_py) (1.24.1)Building wheels for collected packages: multi_agent_ale_py
Building wheel for multi_agent_ale_py (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [106 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\multi_agent_ale_py
copying multi_agent_ale_py\ale_python_interface.py -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
copying multi_agent_ale_py_init_.py -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
running egg_info
writing multi_agent_ale_py.egg-info\PKG-INFO
writing dependency_links to multi_agent_ale_py.egg-info\dependency_links.txt
writing requirements to multi_agent_ale_py.egg-info\requires.txt
writing top-level names to multi_agent_ale_py.egg-info\top_level.txt
reading manifest file 'multi_agent_ale_py.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.md'
writing manifest file 'multi_agent_ale_py.egg-info\SOURCES.txt'
C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\build_py.py:202: SetuptoolsDeprecationWarning:
Installing 'multi_agent_ale_py.tests.fixtures' as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'multi_agent_ale_py.tests.fixtures' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
 
      'multi_agent_ale_py.tests.fixtures' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
 
      Please make sure that 'multi_agent_ale_py.tests.fixtures' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
 
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
 
 
  !!
 
    check.warn(importable)
  copying multi_agent_ale_py\ale_c_wrapper.cpp -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
  copying multi_agent_ale_py\ale_c_wrapper.h -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
  creating build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests
  creating build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests\fixtures
  copying multi_agent_ale_py\tests\fixtures\tetris.bin -> build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests\fixtures
  running build_ext
  Traceback (most recent call last):
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 20, in build_extensions
      subprocess.check_output(["cmake", "--version"])
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 505, in run
      with Popen(*popenargs, **kwargs) as process:
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 951, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 1420, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] 系统找不到指定的文件。
 
  During handling of the above exception, another exception occurred:
 
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 136, in <module>
      setup(
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands   
      dist.run_commands()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands   
      self.run_command(cmd)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command     
      self.distribution.run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run   
      self.run_command(cmd_name)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command     
      self.distribution.run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run        
      _build_ext.build_ext.run(self)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
      self.build_extensions()
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 22, in build_extensions
      raise RuntimeError(
  RuntimeError: CMake must be installed to build the extensions: multi_agent_ale_py.libale_c
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for multi_agent_ale_py
Running setup.py clean for multi_agent_ale_py
Failed to build multi_agent_ale_py
Installing collected packages: multi_agent_ale_py
Running setup.py install for multi_agent_ale_py ... error
error: subprocess-exited-with-error

× Running setup.py install for multi_agent_ale_py did not run successfully.
│ exit code: 1
╰─> [110 lines of output]
running install
C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\multi_agent_ale_py
copying multi_agent_ale_py\ale_python_interface.py -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
copying multi_agent_ale_py_init_.py -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
running egg_info
writing multi_agent_ale_py.egg-info\PKG-INFO
writing dependency_links to multi_agent_ale_py.egg-info\dependency_links.txt
writing requirements to multi_agent_ale_py.egg-info\requires.txt
writing top-level names to multi_agent_ale_py.egg-info\top_level.txt
reading manifest file 'multi_agent_ale_py.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.md'
writing manifest file 'multi_agent_ale_py.egg-info\SOURCES.txt'
C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\build_py.py:202: SetuptoolsDeprecationWarning:
Installing 'multi_agent_ale_py.tests.fixtures' as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'multi_agent_ale_py.tests.fixtures' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
 
      'multi_agent_ale_py.tests.fixtures' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
 
      Please make sure that 'multi_agent_ale_py.tests.fixtures' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
 
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
 
 
  !!
 
    check.warn(importable)
  copying multi_agent_ale_py\ale_c_wrapper.cpp -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
  copying multi_agent_ale_py\ale_c_wrapper.h -> build\lib.win-amd64-cpython-39\multi_agent_ale_py
  creating build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests
  creating build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests\fixtures
  copying multi_agent_ale_py\tests\fixtures\tetris.bin -> build\lib.win-amd64-cpython-39\multi_agent_ale_py\tests\fixtures
  running build_ext
  Traceback (most recent call last):
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 20, in build_extensions
      subprocess.check_output(["cmake", "--version"])
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 505, in run
      with Popen(*popenargs, **kwargs) as process:
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 951, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\subprocess.py", line 1420, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] 系统找不到指定的文件。
 
  During handling of the above exception, another exception occurred:
 
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 136, in <module>
      setup(
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands   
      dist.run_commands()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands   
      self.run_command(cmd)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\install.py", line 68, in run
      return orig.install.run(self)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run 
      self.run_command('build')
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command     
      self.distribution.run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run   
      self.run_command(cmd_name)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command     
      self.distribution.run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command    
      cmd_obj.run()
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run        
      _build_ext.build_ext.run(self)
    File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
      self.build_extensions()
    File "C:\Users\hasee\AppData\Local\Temp\pip-install-l8u61xsi\multi-agent-ale-py_3ba53f58e2e9423cabd3aade4ad2d566\setup.py", line 22, in build_extensions
      raise RuntimeError(
  RuntimeError: CMake must be installed to build the extensions: multi_agent_ale_py.libale_c
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> multi_agent_ale_py

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@xiezhipeng-git xiezhipeng-git changed the title windows install fail windows install multi_agent_ale_py fail Jan 30, 2023
@xiezhipeng-git xiezhipeng-git changed the title windows install multi_agent_ale_py fail windows install multi_agent_ale_py fail in python-3.9.13 Jan 30, 2023
@hanyuyingfd47
Copy link

same problem;
but i download the “multi-agent-ale-py”package,and use the method“cd C:\Anaconda\envs\torch116\Lib\site-packages\Multi-Agent-ALE-master python setup.py install”.
Finally ,i can import pettingzoo[all] but pettingzoo[atari].

Problem :

AttributeError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 from pettingzoo.atari import space_invaders_v2
2 env = space_invaders_v2.env()

File C:\Anaconda\envs\torch116\lib\site-packages\pettingzoo-1.22.3-py3.9.egg\pettingzoo\atari\space_invaders_v2.py:1, in
----> 1 from .space_invaders.space_invaders import env, parallel_env, raw_env

File C:\Anaconda\envs\torch116\lib\site-packages\pettingzoo-1.22.3-py3.9.egg\pettingzoo\atari\space_invaders\space_invaders.py:81, in
78 import os
79 from glob import glob
---> 81 from ..base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn
84 def raw_env(
85 alternating_control=False,
86 moving_shields=True,
(...)
90 **kwargs,
91 ):
92 mode = 33 + (
93 moving_shields * 1
94 + zigzaging_bombs * 2
(...)
97 + alternating_control * 16
98 )

File C:\Anaconda\envs\torch116\lib\site-packages\pettingzoo-1.22.3-py3.9.egg\pettingzoo\atari\base_atari_env.py:4, in
1 from pathlib import Path
3 import gymnasium
----> 4 import multi_agent_ale_py
5 import numpy as np
6 from gymnasium import spaces

File C:\Anaconda\envs\torch116\lib\site-packages\multi_agent_ale_py-0.1.11-py3.9-win-amd64.egg\multi_agent_ale_py_init_.py:1, in
----> 1 from .ale_python_interface import *

File C:\Anaconda\envs\torch116\lib\site-packages\multi_agent_ale_py-0.1.11-py3.9-win-amd64.egg\multi_agent_ale_py\ale_python_interface.py:43, in
36 raise RuntimeError(
37 "Failed to load library {}. Attempted to load {}.\n{}".format(
38 name, library_path, ex))
41 ale_lib = _load_cdll(os.path.dirname(file), "ale_c")
---> 43 ale_lib.ALE_new.argtypes = None
44 ale_lib.ALE_new.restype = c_void_p
45 ale_lib.ALE_del.argtypes = [c_void_p]

File C:\Anaconda\envs\torch116\lib\ctypes_init_.py:395, in CDLL.getattr(self, name)
393 if name.startswith('') and name.endswith(''):
394 raise AttributeError(name)
--> 395 func = self.getitem(name)
396 setattr(self, name, func)
397 return func

File C:\Anaconda\envs\torch116\lib\ctypes_init_.py:400, in CDLL.getitem(self, name_or_ordinal)
399 def getitem(self, name_or_ordinal):
--> 400 func = self._FuncPtr((name_or_ordinal, self))
401 if not isinstance(name_or_ordinal, int):
402 func.name = name_or_ordinal

AttributeError: function 'ALE_new' not found

@elliottower
Copy link
Member

Has anyone been able to successfully install on windows? @hanyuyingfd47 @xiezhipeng-git

@mikepratt1
Copy link

Hi, I am facing the same problem as @xiezhipeng-git, has anybody been able to successfully install on windows?

@xiezhipeng-git
Copy link
Author

@elliottower @[mikepratt1] I did not install successfully, and this project has not been updated for a long time. But there are no issues with the installation of pettingzoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants