I keep getting this error and I’m unsure how to fix it
Collecting rpy2==3.5.10
Downloading rpy2-3.5.10.tar.gz (215 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.9/215.9 KB 261.3 MB/s eta 0:00:00[2023-03-09 20:27:39.275131]
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status ‘error’
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Unable to determine R home: [Errno 2] No such file or directory: 'R'
cffi mode is CFFI_MODE.ANY
Looking for R home with: R RHOME
Unable to determine R home: [Errno 2] No such file or directory: 'R'
R home found: None
Error: rpy2 in API mode cannot be built without R in the PATH or R_HOME defined. Correct this or force ABI mode-only by defining the environment variable RPY2_CFFI_MODE=ABI
[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 forked and deployed your app and these are the error messages I got:
Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
2023-03-10 19:48:18.561 cffi mode is CFFI_MODE.ANY
2023-03-10 19:48:18.574 R home found: /usr/lib/R
2023-03-10 19:48:18.630 R library path: /usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server
2023-03-10 19:48:18.631 LD_LIBRARY_PATH: /usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server
2023-03-10 19:48:18.633 Default options to initialize R: rpy2, --quiet, --no-save
During startup - Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘ExpDes’
2: package ‘ExpDes’ in options("defaultPackages") was not found
/home/appuser/venv/lib/python3.9/site-packages/rpy2/rinterface.py:1110: UserWarning: R is not initialized by the main thread.
Its taking over SIGINT cannot be reversed here, and as a
consequence the embedded R cannot be interrupted with Ctrl-C.
Consider (re)setting the signal handler of your choice from
the main thread.
warnings.warn(
2023-03-10 19:48:18.763 R is already initialized. No need to initialize.
2023-03-10 19:48:19.061 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/app/data-exploration-dashboard/pages/Homogeneity_of_Variance.py", line 6, in <module>
from pages.hov.tabs.premodel import premodel_tab
File "/app/data-exploration-dashboard/pages/hov/tabs/premodel.py", line 3, in <module>
from pages.hov.functions.framework import chooseHOVTest
File "/app/data-exploration-dashboard/pages/hov/functions/framework.py", line 9, in <module>
expdes = rpackages.importr('ExpDes')
File "/home/appuser/venv/lib/python3.9/site-packages/rpy2/robjects/packages.py", line 472, in importr
raise PackageNotInstalledError(
rpy2.robjects.packages.PackageNotInstalledError: The R package "ExpDes" is not installed.
It seems like the problem might be related to not having “ExpDes” installed.
hello, facing the same issue when trying to deploy. I have R on path, as well as this in the app.py: os.environ["R_HOME"] = "/usr/local/bin/R" on a macos. Getting this error:
Collecting rpy2==3.5.14
Downloading rpy2-3.5.14.tar.gz (219 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 219.3/219.3 KB 234.1 MB/s eta 0:00:00[2023-11-10 19:23:40.080888]
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Unable to determine R home: [Errno 2] No such file or directory: 'R'
cffi mode is CFFI_MODE.ANY
Looking for R home with: R RHOME
Unable to determine R home: [Errno 2] No such file or directory: 'R'
R home found: None
Error: rpy2 in API mode cannot be built without R in the PATH or R_HOME defined. Correct this or force ABI mode-only by defining the environment variable RPY2_CFFI_MODE=ABI
[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.
here is a minimal code to reproduce the deployment
Note that requirements.txt and packages.txt are processed before your code runs so changing environment variables in your code won’t affect installation of packages.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.