首页 > 其他分享 >conda 安装 rpy2 版本不匹配问题解决方法

conda 安装 rpy2 版本不匹配问题解决方法

时间:2023-03-16 18:57:34浏览次数:48  
标签:匹配 version python 3.5 conda 版本 rpy2

问题描述:Anaconda3(python 3.8) 安装 rpy2 (R 4.0.4)时尝试使用 conda install rpy2 安装,但是报错如下:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

- rpy2 -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.*']

Your python: python=3.8 

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow  not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

 

解决办法:

1、下载 rpy2 之前,先确认在当前 python 和 R 版本下所支持的 rpy2 版本,版本查询路径如下:https://rpy2.github.io/doc.html

下拉查询对应的 rpy2 版本分别有 3.5.x,3.4.x 等,分别点击,以 3.5.x 为例点击进入,进入其 Background ,获取到其支持的 python 以及 R 版本为:

2、发现 rpy2 3.5.x 即满足需求,这里下载 3.5.1版本,方法如下:pip install rpy2==3.5.1

之后在 spyder(Python 3.8)调用 rpy2,import rpy2.robjects as robjects 可以顺利调用 !

 

 

 

 

 

标签:匹配,version,python,3.5,conda,版本,rpy2
From: https://www.cnblogs.com/lmj-sky/p/17223747.html

相关文章

  • 算法 -- 正则表达式匹配 (动态规划)
    原题:10.正则表达式匹配困难3.5K相关企业给你一个字符串s和一个字符规律p,请你来实现一个支持'.'和'*'的正则表达式匹配。'.'匹配任意单个字符'*'匹配零个......
  • 达梦数据库报错:数据类型不匹配
    最近在用达梦数据库,今天碰到一个问题,报错:数据类型不匹配。查询条件中有个字段是TEXT类型,jdbcType之前是VARCHAR,我把它改成了LONGVARCHAR,心想这下应该好了吧,结果还是报错,......
  • conda & pip 导入导出虚拟环境
    1.常规命令1.新建虚拟环境condacreate-n[虚拟环境名]python=[python版本]2.查看虚拟环境condaenvlistcondainfo-e3.切换虚拟环境sourceactivate[虚......
  • GPU服务器无root权限conda初始化
    1.给anaconda文件写入权限sudochmoda+w.conda如果没有权限则会在创建环境时报以下错误NoWritableEnvsDirError:Nowriteableenvsdirectoriesconfigured.-......
  • 注册插件:违反了继承安全性规则,派生类型必须与基类型的安全性匹配或低于比基类型的安
    当项目升级到VS2010或者2012后(同时NET版本也升级到4.0),会出现如下错误提示信息:类型“XXX”违反了继承安全性规则。派生类型必须与基类型的安全可访问性匹配或者比基类型......
  • 二分图匹配(匈牙利算法和KM算法)
    二分图匹配对于一个二分图,其匹配是一个边的集合,每条边不应用重复的点它有一个匹配,为图中红色线段但这个匹配不是(边数)最大的,因此不是最大匹配匈牙利算法匈牙利算法......
  • 10 url-pattern的匹配规则
    ​ URL的匹配规则精确匹配精确匹配是指<url-pattern>中配置的值必须与url完全精确匹配。<servlet-mapping><servlet-name>demoServlet</servlet-name><......
  • 10 url-pattern的匹配规则
    ​ URL的匹配规则精确匹配精确匹配是指<url-pattern>中配置的值必须与url完全精确匹配。<servlet-mapping><servlet-name>demoServlet</servlet-name><......
  • Anaconda安装配置
    1.下载安装https://www.anaconda.com/products/distributionhttps://mirror.tuna.tsinghua.edu.cn/help/anaconda/添加环境变量 C:\anaconda3和 C:\anaconda3\Scri......
  • python的正则表达式匹配C类地址
    简介如果你不理解Python正则表达式,可以参考以下步骤:学习正则表达式的基本语法。正则表达式是一种描述字符串模式的语言,通过一些特殊字符和语法规则来描述字符串的组成......