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

Error when trying to install rpy2 #1032

Open
zivlang opened this issue Jun 4, 2023 · 2 comments
Open

Error when trying to install rpy2 #1032

zivlang opened this issue Jun 4, 2023 · 2 comments
Labels

Comments

@zivlang
Copy link

zivlang commented Jun 4, 2023

When using the command 'pip install rpy2', the following error message is printed:

Collecting rpy2
  Using cached rpy2-3.5.12.tar.gz (217 kB)
  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
  ╰─> [28 lines of output]
      Traceback (most recent call last):
        File "c:\users\97254\working_project\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "c:\users\97254\working_project\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "c:\users\97254\working_project\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel

          return hook(config_settings)
        File "C:\Users\97254\AppData\Local\Temp\pip-build-env-b21o8iu5\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\97254\AppData\Local\Temp\pip-build-env-b21o8iu5\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "C:\Users\97254\AppData\Local\Temp\pip-build-env-b21o8iu5\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 124, in <module>
        File "<string>", line 110, in get_r_c_extension_status
        File "./rpy2/situation.py", line 295, in get_r_flags
          _get_r_cmd_config(r_home, flags,
        File "./rpy2/situation.py", line 255, in _get_r_cmd_config
          output = subprocess.check_output(
        File "C:\Users\97254\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Users\97254\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 501, in run
          with Popen(*popenargs, **kwargs) as process:
        File "C:\Users\97254\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\97254\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, 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.
@mohamedbahru
Copy link

I also got the same error. Dont know how to fix it.

@alekin2
Copy link

alekin2 commented Jul 1, 2023

Try to install R 4.3.1 and set R_HOME to C:\Program Files\R\R-4.3.1
reboot pc, then pip install rpy2 from administrator cmd.

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

No branches or pull requests

4 participants