Skip to content

Help with Python, R and RPY

3 messages · Andrew Criswell, Walter Moreira, Zed Shaw

#
Hi All:

Walter Moreira wrote a small extension module for using the R programming
language from within Python. Tim Church's example at
http://www.cmat.edu.uy/~walterm/rpy was so compelling, I could not resist
installing it on my Linux Mandrake 8.1 box.

But I ran into problems.

I have installed on Mandrake 8.1 both python and R:

        R-base-1.4.1-1mdk.i586.rpm
        R-recommended-1.4.1-1mdk.i586.rpm

        python-2.2-9mdk.i586.rpm
        python-base-2.2-9mdk.i586.rpm

I have also checked on the location of R using R RHOME which returns
/usr/lib/R.

When I run

        python setup.py install

I get the following complaints,

[root at localhost rpy]# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 17, in ?
    get_config_vars()['OPT'] = '-DNDEBUG -g -O3 -Wall'
  File "/usr/lib/python2.2/distutils/sysconfig.py", line 408, in
get_config_vars
    func()
  File "/usr/lib/python2.2/distutils/sysconfig.py", line 313, in _init_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable
to open /usr/lib/python2.2/config/Makefile (No such file or directory)
[root at localhost rpy]#


What do I need to do???

Thanks,
ANDREW


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Tue, Mar 12, 2002 at 12:13:53AM +0700, arcriswell wrote:
Hi. Looks like the file /usr/lib/python2.2/config/Makefile is missing, which
is very strange if you compile it from sources, as you told me in another
message. Could you check the directory /usr/lib/python2.2/config to see what
it contains?

Have you build from the standard sources (from python.org), or from sources in
the mandrake distro? I suggest the first.

Although, as Tim said, you will need to rebuild R as shared lib, so I suggest
also to download the R sources from www.r-project.org.

It should build fine with that packages.

Hope it helps,
Walter
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Hi Andrew,

It appears that you have become the victim of the classic "devel"
packages snare.  Basically, any time you wish to compile something
against an RPM package on Mandrake, RedHat, RedFlag, and other RedHat
derivatives, you need to also get the "devel" version of the package.

All you need to do is grab the python-devel-2.1.1-3mdk.i586.rpm and
install it also.  You can find more information on what this RPM has at:

http://rpmfind.net//linux/RPM/mandrake/8.1/i586/Mandrake/RPMS/python-devel-2.1.1-3mdk.i586.html


Hope that helps.

Zed

P.S., It might be a good thing for you to setup a "cooker" source so you
can do urpmi and automagically install these things.  Contact me off
list if you are interested in setting this up.  It's fairly easy.
On Mon, 2002-03-11 at 09:13, arcriswell wrote:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._