Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9284323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:52:19+00:00 2026-06-18T18:52:19+00:00

I am having trouble installing the Python package rpy2 . I have already compiled

  • 0

I am having trouble installing the Python package rpy2. I have already compiled R as a shared library, but I do not have admin priviledges so I am trying to install rpy2 with:

pip install -user rpy2

However, I am getting the following error:

./rpy/rinterface/_rinterface.c:86:31: fatal error:
readline/readline.h: No such file or directory

compilation terminated.

error: command ‘gcc’ failed with exit status 1

I have downloaded readline to:

/some/path/readline-6.2/

where I can see readline.h (I have also compiled readline just in case)

My question:

How can I make rpy2 (or pip) aware of this location with readline.h to avoid the header compilation error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:52:21+00:00Added an answer on June 18, 2026 at 6:52 pm

    You’ll need to actually install readline, not just download it, and then point rpy2 to it with CFLAGS and LDFLAGS.

    Try this approach. It’s almost working for me – I have the same problem, except an additional wrinkle that rpy2 seems to be linking against the system R instead of my homedir install.

    First, I downloaded readline to ~/src/readline-6.2, and installed it with ./configure --prefix=$HOME && make && make install. (You need to install it somewhere, not just download the source.)

    Then I re-compiled R with

    CPPFLAGS="-I/usr/local/include -I$HOME/include/" \
    LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -L$HOME/lib64 -L$HOME/lib" \
    ./configure --prefix=$HOME --enable-BLAS-shlib --enable-R-shlib
    make
    make install
    

    R is definitely now using that readline:

    $ ldd ~/lib64/R/lib/libR.so | grep readline
    libreadline.so.6 => /home/dsutherl/lib/libreadline.so.6 (0x00007f8104207000)
    

    The same for my in-home install of Python (3.2.3, since h5py doesn’t work with 3.3 yet):

    CFLAGS="-I/usr/local/include -I$HOME/include/" \
    LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -L$HOME/lib64 -L$HOME/lib" \
    ./configure --prefix=$HOME
    make
    make install
    

    And again:

    $ ldd ~/lib/python3.2/lib-dynload/readline.cpython-32m.so | grep readline
    libreadline.so.6 => /home/dsutherl/lib/libreadline.so.6 (0x00007fbfff5c2000)
    

    Then I downloaded the rpy2 source and built that:

    CFLAGS="-I/usr/local/include -I$HOME/include/" \
    LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -L$HOME/lib64 -L$HOME/lib" \
    python3 setup.py build --r-home $HOME/lib64/R install
    

    This seemed successful, and ldding the .sos in site-packages/rpy2 links to the right libreadline…but to the system R, instead of mine, despite the explicit --r-home.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble installing RJSONIO. install.packages tells me that the package is not
I am having real trouble installing SUDS in python 2.6.4. I have tried to
I'm having trouble installing Tomcat on my windows XP machine. I already have Apache
I've downloaded the windows binary from http://www.mysqludf.org/lib_mysqludf_preg/ but I'm having trouble installing it. If
I am having some trouble installing SAC onto Ubuntu. I have downloaded all the
I am on Ubuntu 10.04, Python 2.6.5 & having some trouble installing pyLucene. Here's
I am having trouble installing the plugin, I have tried with and without https,
I'm new to Python. I'm currently on Py3k (Win). I'm having trouble installing a
I'm having troubles with installing packages in Python 3. I have always installed packages
I'm having trouble installing this library. Here is the sites official guide: Download IP2Location

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.