Hi Laurent,
Apologies if this is a bit curt/blunt - I'm running late and just
squeezed in an attempt to build rpy2 (from the zip file for 2.1.0rc)
before going home. It is mostly a list of questions I'm afraid.
I've just tied to build it using the MS compiler under Python 2.6 (a
setup I know can build other Python packages with C code), and failed.
First attempt:
C:\Downloads\rpy2-2.1.0rc>c:\python26\python setup.py bdist_wininst
c:\python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option:
'install_requires'
warnings.warn(msg)
running bdist_wininst
running build
running build_py
running build_ext
Error: Tried to guess R's HOME but no R command in the PATH.
What is this install_requires warning about?
Why isn't rpy2 checking the registry to find R (a regression from rpy1)?
How do I tell it where I have R installed (other than via the PATH)?
>From looking at setup.py there is something about this.
I updated my PATH to include "C:\Program Files\R\R-2.10.1\bin" and
tried again, and got further (this is the output from the second run -
same error but without all the noise):
C:\Downloads\rpy2-2.1.0rc>c:\python26\python setup.py bdist_wininst
c:\python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option:
'install_requires'
warnings.warn(msg)
running bdist_wininst
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 302, in <module>
[os.path.join('doc', 'source', 'rpy2_logo.png')])]
File "c:\python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "c:\python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "c:\python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "c:\python26\lib\distutils\command\bdist_wininst.py", line 125, in run
self.run_command('build')
File "c:\python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "c:\python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "c:\python26\lib\distutils\command\build.py", line 134, in run
self.run_command(cmd_name)
File "c:\python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "c:\python26\lib\distutils\dist.py", line 994, in run_command
cmd_obj.ensure_finalized()
File "c:\python26\lib\distutils\cmd.py", line 117, in ensure_finalized
self.finalize_options()
File "setup.py", line 121, in finalize_options
include_dirs = get_rconfig(r_home, '--cppflags')[0].split()
File "setup.py", line 196, in get_rconfig
raise Exception(cmd + '\nreturned\n' + rconfig)
Exception: "C:\PROGRA~1\R\R-210~1.1\bin\R" CMD config --cppflags
returned
Note this gives sane output:
C:\Downloads\rpy2-2.1.0rc>R CMD config
Usage: R CMD config [options] [VAR]
Get the value of a basic R configure variable VAR which must be among
those listed in the 'Variables' section below, or the header and
library flags necessary for linking against R.
Options:
-h, --help print short help message and exit
-v, --version print version info and exit
--cppflags print pre-processor flags required to compile
a program using R as a library
--ldflags print linker flags needed for linking against
the R library
Variables:
BLAS_LIBS flags needed for linking against external BLAS libraries
CC C compiler command
CFLAGS C compiler flags
CPICFLAGS special flags for compiling C code to be turned into a
shared library
CPP C preprocessor
CPPFLAGS C/C++ preprocessor flags, e.g. -I<dir> if you have
headers in a nonstandard directory <dir>
CXX C++ compiler command
CXXCPP C++ preprocessor
CXXFLAGS C++ compiler flags
CXXPICFLAGS special flags for compiling C++ code to be turned into a
shared library
DYLIB_EXT file extension (including '.') for dynamic libraries
DYLIB_LD command for linking dynamic libraries which contain
object files from a C or Fortran compiler only
DYLIB_LDFLAGS
special flags used by DYLIB_LD
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
FLIBS linker flags needed to link Fortran code
FPICFLAGS special flags for compiling Fortran code to be turned
into a shared library
FC Fortran 9x compiler command
FCFLAGS Fortran 9x compiler flags
FCPICFLAGS special flags for compiling Fortran 9x code to be turned
into a shared library
JAR Java archive tool command
JAVA Java interpreter command
JAVAC Java compiler command
JAVAH Java header and stub generator command
JAVA_HOME path to the home of Java distribution
JAVA_LIBS flags needed for linking against Java libraries
JAVA_CPPFLAGS C preprocessor flags needed for compiling JNI programs
LAPACK_LIBS flags needed for linking against external LAPACK libraries
LIBnn location for libraries, e.g. 'lib' or 'lib64' on this platform
LDFLAGS linker flags, e.g. -L<dir> if you have libraries in a
nonstandard directory <dir>
OBJC Objective C compiler command
OBJCFLAGS Objective C compiler flags
MAKE Make command
SAFE_FFLAGS Safe (as conformant as possible) Fortran 77 compiler flags
SHLIB_CFLAGS additional CFLAGS used when building shared objects
SHLIB_CXXLD command for linking shared objects which contain
object files from a C++ compiler
SHLIB_CXXLDFLAGS
special flags used by SHLIB_CXXLD
SHLIB_EXT file extension (including '.') for shared objects
SHLIB_FFLAGS additional FFLAGS used when building shared objects
SHLIB_LD command for linking shared objects which contain
object files from a C or Fortran compiler only
SHLIB_LDFLAGS
special flags used by SHLIB_LD
SHLIB_FCLD, SHLIB_FCLDFLAGS
ditto when using Fortran 9x
TCLTK_CPPFLAGS
flags needed for finding the tcl.h and tk.h headers
TCLTK_LIBS flags needed for linking against the Tcl and Tk libraries
Report bugs to <[email protected]>.
--
However, including the --cppflags flag makes things go a bit odd:
C:\Downloads\rpy2-2.1.0rc>R CMD config --cppflags
/cygdrive/c/PROGRA~1/R/R-210~1.1/bin/config.sh: line 143: make:
command not found
/cygdrive/c/PROGRA~1/R/R-210~1.1/bin/config.sh: line 144: make:
command not found
R was not built as a library
Note that there really is a file "C:\Program
Files\R\R-2.10.1\bin\config.sh" and it may be possible to get it to
run on my machine since I have cygwin. I get the same with R-2.9.2 and
R-2.8.2. Just in case it was the problem, I edited my PATH again to
remove C:\cygwin\bin\;C:\cygwin\usr\bin\; and retried, but R acts the
same way.
However, ignoring that, it claims my R installs were not built as libraries (?).
I wonder if this is a Windows specific bug in the config support in
recent versions of R?
What was the last version of R known to work with rpy2 on Windows XP 32 bit?
Regards,
Peter
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list