rpy2 doesn't install cleanly on a Mac via pipenv. This leads to the following error when starting the app
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/Users/ronan/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/ronan/anaconda3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/management/base.py", line 390, in check
include_deployment_checks=include_deployment_checks,
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/urls/resolvers.py", line 584, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/urls/resolvers.py", line 577, in urlconf_module
return import_module(self.urlconf_name)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/ronan/work/WebOmics/web_omics/web_omics/urls.py", line 8, in <module>
path('linker/', include('linker.urls')),
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/ronan/work/WebOmics/web_omics/linker/urls.py", line 3, in <module>
from . import views
File "/Users/ronan/work/WebOmics/web_omics/linker/views/__init__.py", line 1, in <module>
from linker.views.create_analysis_view import *
File "/Users/ronan/work/WebOmics/web_omics/linker/views/create_analysis_view.py", line 12, in <module>
from linker.views.functions import reactome_mapping, save_analysis, change_column_order, get_context
File "/Users/ronan/work/WebOmics/web_omics/linker/views/functions.py", line 22, in <module>
from linker.views.pipelines import WebOmicsInference
File "/Users/ronan/work/WebOmics/web_omics/linker/views/pipelines.py", line 11, in <module>
from rpy2.robjects.packages import importr
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/rpy2/robjects/__init__.py", line 16, in <module>
import rpy2.rinterface as rinterface
File "/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/rpy2/rinterface/__init__.py", line 51, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: dlopen(/Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/rpy2/rinterface/_rinterface.cpython-37m-darwin.so, 2): Library not loaded: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib
Referenced from: /Users/ronan/.local/share/virtualenvs/web_omics-VCzYizAw/lib/python3.7/site-packages/rpy2/rinterface/_rinterface.cpython-37m-darwin.so
Reason: image not found