Unable to run pip install rpy2 (mac)

Issue #600 new
MonicaS created an issue

pip install rpy2 leads to….

  • Failed building wheel for rpy2
  • Command "/Users/msilva/anaconda3/envs/MedImageEnv2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-record-frhor3kk/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/

macOS 10.15.1 , Python 3.6.8 , R 3.6.1

I read other issues but cannot implement the solutions to make it work. Thank you for your help!

All the code when trying to install:

(MedImageEnv2) mbp-de-monica:~ monicasilva$ pip install rpy2

Collecting rpy2

Using cached https://files.pythonhosted.org/packages/d9/51/d5c41ac70e0aa3272f24cf836bd35d6246c95b98d8d811f338cec5a8098e/rpy2-3.2.2.tar.gz

Requirement already satisfied: pytest in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (5.1.3)

Requirement already satisfied: jinja2 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (2.10.1)

Requirement already satisfied: pytz in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (2019.1)

Requirement already satisfied: simplegeneric in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (0.8.1)

Requirement already satisfied: tzlocal in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (2.0.0)

Requirement already satisfied: cffi>=1.13.1 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from rpy2) (1.13.2)

Requirement already satisfied: more-itertools>=4.0.0 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (7.2.0)

Requirement already satisfied: pluggy<1.0,>=0.12 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (0.13.0)

Requirement already satisfied: attrs>=17.4.0 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (19.1.0)

Requirement already satisfied: atomicwrites>=1.0 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (1.3.0)

Requirement already satisfied: wcwidth in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (0.1.7)

Requirement already satisfied: packaging in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (19.2)

Requirement already satisfied: py>=1.5.0 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (1.8.0)

Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from pytest->rpy2) (0.23)

Requirement already satisfied: MarkupSafe>=0.23 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from jinja2->rpy2) (1.1.1)

Requirement already satisfied: pycparser in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from cffi>=1.13.1->rpy2) (2.19)

Requirement already satisfied: six in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from packaging->pytest->rpy2) (1.12.0)

Requirement already satisfied: pyparsing>=2.0.2 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from packaging->pytest->rpy2) (2.3.1)

Requirement already satisfied: zipp>=0.5 in ./anaconda3/envs/MedImageEnv2/lib/python3.6/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->pytest->rpy2) (0.6.0)

Building wheels for collected packages: rpy2

Building wheel for rpy2 (setup.py) ... error

Complete output from command /Users/monicasilva/anaconda3/envs/MedImageEnv2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-wheel-hn186zzg --python-tag cp36:

running bdist_wheel

running build

running build_py

file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found

creating build

creating build/lib.macosx-10.7-x86_64-3.6

creating build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/situation.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/_rinterface_cffi_build.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/rinterface.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/container.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/functional.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/indexing.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/_rinterface_capi.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/embedded_mswin.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/na_values.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/openrlib.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/bufferprotocol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/ffi_proxy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/memorymanagement.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/sexp.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/embedded.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/functions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/vectors.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/numpy2ri.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/methods.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/constants.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/packages_utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/pandas2ri.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/language.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/environments.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/help.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/robject.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/grid.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/tidyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/ggplot2.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/grdevices.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/dbplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/dplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/process_revents.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/rmagic.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/html.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/ggplot.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

copying ./rpy2/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

copying ./rpy2/tests/utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_pairlist.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_externalptr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_na.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_openrlib.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_endr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_byte.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vectors.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_complex.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_memorymanagement.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_int.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_embedded_r.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_numpy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_bool.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_str.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_bufferprotocol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_float.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_functions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_lang.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_list.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_noinitialization.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_symbol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_environment.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_sexp.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

package init file './rpy2/tests/rlike/__init__.py' not found (or not a regular file)

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_container.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_functional.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_indexing.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_formula.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_pandas_conversions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_methods.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_robjects.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_conversion_numpy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_array.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_packages_utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_extractdelegator.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_factor.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_translated_function.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_function.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_rs4.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_serialization.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_language.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_datetime.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_help.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_environment.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_dataframe.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_html.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_ggplot.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_rmagic.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

package init file './rpy2/tests/robjects/lib/__init__.py' not found (or not a regular file)

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_grid.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_grdevices.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_ggplot2.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_dplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_tidyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/rinterface_lib/R_API.h -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/R_API_eventloop.h -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found

generating cffi module 'build/lib.macosx-10.7-x86_64-3.6/_rinterface_cffi_abi.py'

running build_ext

generating cffi module 'build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c'

creating build/temp.macosx-10.7-x86_64-3.6

building '_rinterface_cffi_api' extension

creating build/temp.macosx-10.7-x86_64-3.6/build

creating build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include -arch x86_64 -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include -arch x86_64 -DRPY2_RLEN_LONG=True -Irpy2/rinterface_lib/ -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include/python3.6m -c build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c -o build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.o

In file included from build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c:493:

rpy2/rinterface_lib/R_API.h:201:25: warning: this function declaration is not a prototype [-Wstrict-prototypes]

typedef void* (*DL_FUNC)( ) ;

‌ ^

‌ void

1 warning generated.

gcc -bundle -undefined dynamic_lookup -L/Users/monicasilva/anaconda3/envs/MedImageEnv2/lib -arch x86_64 -L/Users/monicasilva/anaconda3/envs/MedImageEnv2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.o -L/usr/local/lib -lpcre -llzma -lbz2 -lz -licucore -ldl -lm -liconv -o build/lib.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.abi3.so -fopenmp -F/Library/Frameworks/R.framework/.. -framework R

clang: error: unsupported option '-fopenmp'

error: command 'gcc' failed with exit status 1


Failed building wheel for rpy2

Running setup.py clean for rpy2

Failed to build rpy2

Installing collected packages: rpy2

Running setup.py install for rpy2 ... error

Complete output from command /Users/monicasilva/anaconda3/envs/MedImageEnv2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-record-frhor3kk/install-record.txt --single-version-externally-managed --compile:

running install

running build

running build_py

file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found

creating build

creating build/lib.macosx-10.7-x86_64-3.6

creating build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/situation.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/_rinterface_cffi_build.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/rinterface.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

copying ./rpy2/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/container.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/functional.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

copying ./rpy2/rlike/indexing.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rlike

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/_rinterface_capi.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/embedded_mswin.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/na_values.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/openrlib.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/bufferprotocol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/ffi_proxy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/memorymanagement.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/sexp.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/embedded.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/functions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/vectors.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/numpy2ri.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/methods.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/constants.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/packages_utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/pandas2ri.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/language.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/environments.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/help.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

copying ./rpy2/robjects/robject.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/grid.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/tidyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/ggplot2.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/grdevices.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/dbplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

copying ./rpy2/robjects/lib/dplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/robjects/lib

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

copying ./rpy2/interactive/process_revents.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/interactive

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/rmagic.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/html.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

copying ./rpy2/ipython/ggplot.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/ipython

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

copying ./rpy2/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

copying ./rpy2/tests/utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_pairlist.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_externalptr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_na.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_openrlib.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_endr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_byte.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vectors.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_complex.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_memorymanagement.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_int.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_embedded_r.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_numpy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_bool.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_str.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_bufferprotocol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_float.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_functions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_lang.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_vector_list.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_noinitialization.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_symbol.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_environment.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

copying ./rpy2/tests/rinterface/test_sexp.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rinterface

package init file './rpy2/tests/rlike/__init__.py' not found (or not a regular file)

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_container.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_functional.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

copying ./rpy2/tests/rlike/test_indexing.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/rlike

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_formula.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_pandas_conversions.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_methods.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_packages.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_robjects.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_conversion_numpy.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_array.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_conversion.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_packages_utils.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_extractdelegator.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_factor.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_translated_function.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_function.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_rs4.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_serialization.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_language.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_vector_datetime.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_help.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_environment.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

copying ./rpy2/tests/robjects/test_dataframe.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_html.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_ggplot.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

copying ./rpy2/tests/ipython/test_rmagic.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/ipython

package init file './rpy2/tests/robjects/lib/__init__.py' not found (or not a regular file)

creating build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_grid.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_grdevices.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_ggplot2.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_dplyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/tests/robjects/lib/test_tidyr.py -> build/lib.macosx-10.7-x86_64-3.6/rpy2/tests/robjects/lib

copying ./rpy2/rinterface_lib/R_API.h -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

copying ./rpy2/rinterface_lib/R_API_eventloop.h -> build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface_lib

file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found

generating cffi module 'build/lib.macosx-10.7-x86_64-3.6/_rinterface_cffi_abi.py'

running build_ext

generating cffi module 'build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c'

creating build/temp.macosx-10.7-x86_64-3.6

building '_rinterface_cffi_api' extension

creating build/temp.macosx-10.7-x86_64-3.6/build

creating build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include -arch x86_64 -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include -arch x86_64 -DRPY2_RLEN_LONG=True -Irpy2/rinterface_lib/ -I/Users/monicasilva/anaconda3/envs/MedImageEnv2/include/python3.6m -c build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c -o build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.o

In file included from build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.c:493:

rpy2/rinterface_lib/R_API.h:201:25: warning: this function declaration is not a prototype [-Wstrict-prototypes]

typedef void* (*DL_FUNC)( );

‌ ^

‌ void

1 warning generated.

gcc -bundle -undefined dynamic_lookup -L/Users/monicasilva/anaconda3/envs/MedImageEnv2/lib -arch x86_64 -L/Users/monicasilva/anaconda3/envs/MedImageEnv2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/build/temp.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.o -L/usr/local/lib -lpcre -llzma -lbz2 -lz -licucore -ldl -lm -liconv -o build/lib.macosx-10.7-x86_64-3.6/_rinterface_cffi_api.abi3.so -fopenmp -F/Library/Frameworks/R.framework/.. -framework R

clang: error: unsupported option '-fopenmp'

error: command 'gcc' failed with exit status 1


Command "/Users/monicasilva/anaconda3/envs/MedImageEnv2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-record-frhor3kk/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/cz/_5gf33qx71l4t6rxg6qv0v8c0000gn/T/pip-install-vd6ypz8f/rpy2/

Comments (1)

  1. Laurent Gautier

    On OSX, the R C API requires a version of clang and libraries that supports openmp. You can either install a more recent clang (for example through homebrew) or install rpy2 without building/compiling the API interfacing:

    RPY2_CFFI_MODE=API pip install rpy2
    

  2. Log in to comment