0

Trying to install Nethack Learning Environment (nle) according to their github: https://github.com/facebookresearch/nle

I am running windows 10 x64. I successfully installed all required packages (conda, cmake, cuda, gym, stable-baselines3, even graphviz which someone online said would help) and still return an error when I execute the following:

(nle) C:\Users\g>pip install nle 

I get the following error:

 Collecting nle
  Using cached nle-0.8.1.tar.gz (6.9 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
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup
          super(_BuildMetaLegacyBackend,
        File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 127, in <module>
        File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 415, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 493, in run
          with Popen(*popenargs, **kwargs) as process:
        File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 858, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 1311, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [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.

I have even tried installing without the conda environment, via

C:\Users\g>pip install nle

Which returns the following error:

 Collecting nle
  Using cached nle-0.8.1.tar.gz (6.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\g\miniconda3\python.exe' 'C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\g\AppData\Local\Temp\tmp4okewis9'
       cwd: C:\Users\g\AppData\Local\Temp\pip-install-b2kh8tw6\nle_afe88c6035c142eab966b05f6aa62307
  Complete output (25 lines):
  Traceback (most recent call last):
    File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 349, in <module>
      main()
    File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 117, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
      self.run_setup()
    File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup
      super(_BuildMetaLegacyBackend,
    File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
      exec(code, locals())
    File "<string>", line 127, in <module>
    File "C:\Users\g\miniconda3\lib\subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "C:\Users\g\miniconda3\lib\subprocess.py", line 505, in run
      with Popen(*popenargs, **kwargs) as process:
    File "C:\Users\g\miniconda3\lib\subprocess.py", line 951, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\g\miniconda3\lib\subprocess.py", line 1420, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e0/18/f6e78119aa5ab5bc5edffa817e3748100f47b96ca8afb3b39659629b906a/nle-0.8.1.tar.gz#sha256=ab20bf3ef72f79891c70fa0d99abdd41ed77784c0f884c5e9116c552708950a5 (from https://pypi.org/simple/nle/) (requires-python:>=3.5). Command errored out with exit status 1: 'C:\Users\g\miniconda3\python.exe' 'C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\g\AppData\Local\Temp\tmp4okewis9' Check the logs for full command output.

It then appears to retry installing the package and of course gets stuck at the same point, spitting out the same error.

List of other commands I have tried:

pip install --no-cache-dir nle 
pip install ez_setup
pip install --upgrade setuptools

Results:

Same error as before, all three times

desertnaut
  • 57,590
  • 26
  • 140
  • 166
lordg52
  • 1
  • 1
  • 1
    The exception tells you that the install process is trying to run a program (and the program doesn't exist -- at least, not under the stated name). Have you looked at the lines of source in the stack trace to figure out what it's trying to run? – Charles Duffy Sep 24 '22 at 23:10
  • 1
    Also, even though you've _installed_ `cmake` &c., make sure they actually run. `cmake --version` should work, f/e. – Charles Duffy Sep 24 '22 at 23:12
  • 1
    And, really, just _read through_ https://github.com/facebookresearch/nle/blob/main/setup.py. You'll see it trying to call lots of programs -- `git`, `ninja`, and others. – Charles Duffy Sep 24 '22 at 23:12
  • 2
    The other thing, though -- that setup.py lists the supported operating systems, _and Windows isn't one of them_; only "Operating System :: POSIX :: Linux" and "Operating System :: MacOS". – Charles Duffy Sep 24 '22 at 23:14
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 25 '22 at 11:03

0 Answers0