Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error when pip updates rpy2 #33

Closed
ThomasAkam opened this issue Dec 12, 2018 · 1 comment
Closed

Installation error when pip updates rpy2 #33

ThomasAkam opened this issue Dec 12, 2018 · 1 comment

Comments

@ThomasAkam
Copy link

I just tried installing pymer4 on windows 7 in a newly created conda environment using the follwing commands:

conda create --name pymer4
activate pymer4
conda install pip
conda install -c conda-forge r r-base r-lmertest r-lsmeans rpy2
pip install pymer4

The final command gave the following error:

(pymer4) C:\Users\takam>pip install pymer4
Collecting pymer4
  Using cached https://files.pythonhosted.org/packages/fe/81/a5a639614c22b901905
418f1f7f5364ae23c97ae4b081904665308ff233a/pymer4-0.6.0-py2.py3-none-any.whl
Collecting numpy>=1.12.0 (from pymer4)
  Downloading https://files.pythonhosted.org/packages/00/0e/5a8c34adb97fc1cd6636
d78050e575945e874c8516d501421d5a0f377a6c/numpy-1.15.4-cp37-none-win_amd64.whl (1
3.5MB)
    100% |████████████████████████████████| 13.5MB 1.5MB/s
Collecting rpy2>=2.9.4 (from pymer4)
  Using cached https://files.pythonhosted.org/packages/02/d1/074ffbbe7b4bf74c60b
75d74c8e67a1e4515b0d85f85cd6540e39610754a/rpy2-2.9.5.tar.gz
    Complete output from command python setup.py egg_info:
    R version 3.5.1 (2018-07-02) -- "Feather Spray"
    Copyright (C) 2018 The R Foundation for Statistical Computing
    Platform: x86_64-w64-mingw32/x64 (64-bit)

    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under the terms of the
    GNU General Public License versions 2 or 3.
    For more information about these matters see
    http://www.gnu.org/licenses/.

    'sh' is not recognized as an internal or external command,
    operable program or batch file.
    R version 3.5.1 (2018-07-02) -- "Feather Spray"
    C:\Users\takam\Anaconda3\envs\pymer4\lib\R\bin\x64\R CMD config --ldflags
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\takam\AppData\Local\Temp\pip-install-li1spxm4\rpy2\setup.py
", line 374, in <module>
        ri_ext = getRinterface_ext()
      File "C:\Users\takam\AppData\Local\Temp\pip-install-li1spxm4\rpy2\setup.py
", line 269, in getRinterface_ext
        ldf = shlex.split(' '.join(rexec.cmd_config('--ldflags')))
      File "C:\Users\takam\AppData\Local\Temp\pip-install-li1spxm4\rpy2\setup.py
", line 222, in cmd_config
        universal_newlines = True)
      File "C:\Users\takam\Anaconda3\envs\pymer4\lib\subprocess.py", line 389, i
n check_output
        **kwargs).stdout
      File "C:\Users\takam\Anaconda3\envs\pymer4\lib\subprocess.py", line 481, i
n run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '('C:\\Users\\takam\\Anaconda3\\envs\
\pymer4\\lib\\R\\bin\\x64\\R', 'CMD', 'config', '--ldflags')' returned non-zero
exit status 1.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\takam\Ap
pData\Local\Temp\pip-install-li1spxm4\rpy2\

As the error occured when pip was trying to upgrade rpy2 to, I tried upgrading rpy2 using conda before trying to install pymer4:

conda install rpy2=2.9.4

I was then able to install pymer4 successfully with pip, but am posting this here in case anyone encounters the same issue.

@ejolly
Copy link
Owner

ejolly commented Oct 30, 2019

@ThomasAkam I know this is pretty late but hopefully the new version (just released) should address these compatibility issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants