visualstudio,Python,命令“Python设置.pyegg_info“失败,错误代码1位于C:\Users\…\AppData\Local\Temp\pipinstall953alcay\rpy2中\

2024-10-01 04:44:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在python3.6的visualstudioprofessional 2017版本15.8.2中安装rpy2,我得到了如下所示的egg_info错误。在

我也曾寻找过类似的问题,但没有幸运地听从他们的建议

  • 我以管理员身份运行Visual Studio
  • 我已经确保pip(版本18.0)和setuptools(版本40.2.0)是最新的

我正在运行windows 10,idears已用完

    ----- Installing 'rpy2' -----
Collecting rpy2
  Using cached https://files.pythonhosted.org/packages/f1/98/c7652cc9d7fc0afce74d2c30a52b9c9ac391713a63d037e4ab8feb56c530/rpy2-2.9.4.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/.

    R version 3.5.1 (2018-07-02) -- "Feather Spray"
    C:\PROGRA~1\R\R-35~1.1\bin\x64\R CMD config --ldflags
    'sh' is not recognized as an internal or external command,
    operable program or batch file.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ERIKWA~1\AppData\Local\Temp\pip-install-953alcay\rpy2\setup.py", line 374, in <module>
        ri_ext = getRinterface_ext()
      File "C:\Users\ERIKWA~1\AppData\Local\Temp\pip-install-953alcay\rpy2\setup.py", line 269, in getRinterface_ext
        ldf = shlex.split(' '.join(rexec.cmd_config('--ldflags')))
      File "C:\Users\ERIKWA~1\AppData\Local\Temp\pip-install-953alcay\rpy2\setup.py", line 222, in cmd_config
        universal_newlines = True)
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\subprocess.py", line 418, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '('C:\\PROGRA~1\\R\\R-35~1.1\\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\ERIKWA~1\AppData\Local\Temp\pip-install-953alcay\rpy2\
----- Failed to install 'rpy2' -----

Tags: installpipinpy版本configlocalsetup