[英]R reticulate - recordlinkage package installed in r script but not importing in python script
I've tried我试过了
py_install("recordlinkage")
It returns this error :它返回此错误:
py_install("recordlinkage") Collecting package metadata: ...working... done Solving environment: ...working... failed py_install("recordlinkage") 正在收集包元数据:...working... done 解决环境:...working... failed
PackagesNotFoundError: The following packages are not available from current channels: PackagesNotFoundError:当前频道不提供以下软件包:
- recordlinkage记录链接
Current channels:当前频道:
- https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/win-64
- https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to要搜索可能提供您正在寻找的 conda 包的备用频道,请导航到
https://anaconda.org
and use the search bar at the top of the page.并使用页面顶部的搜索栏。
So I went to https://anaconda.org and searched recordlinkage and it returned r-recordlinkage所以我去了https://anaconda.org并搜索了recordlinkage并返回了r-recordlinkage
Then I did py_install("r-recordlinkage"), it installed it beautifully.然后我做了 py_install("r-recordlinkage"),它安装得很漂亮。 When I do当我做
import r-recordlinkage
in the .py script it says在 .py 脚本中它说
SyntaxError: invalid syntax (, line 1)语法错误:无效语法(,第 1 行)
what am I missing here?我在这里错过了什么? :/ :/
只需写下:“ pip install recordlinkage
”对我来说,它有效!。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.