python - 使用 reticulate 在 R 中安装 python 包时出错
问题描述
我正在尝试访问 S&P Capital IQ 的 Python API 以提取数据以生成报告。但是,我完全不熟悉 Python 是如何工作的(之前只使用过 R),所以我希望就如何capiq_excel
使用reticulate
. 对于某些背景,我订阅了 S&P Capital IQ,并且在我的计算机上加载了 excel 插件,这显然是让它工作的依赖项。
当我尝试使用以下代码在 R 中安装包时
library(reticulate)
py_install(capiq_excel)
我收到以下错误
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- capiq_excel
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Error: one or more Python packages failed to install [error code 1]
我接近这个完全错误吗?安装包后,我想使用 API 在 R 中创建数据帧。capiq_excel
包的文档可以在这里找到(https://nickderobertis.github.io/capiq-excel-downloader-py/tutorial.html#概述)
TIA
解决方案
第一次尝试
库(网状)py_install(“capiq_excel”)
如果上面的代码不起作用试试这个
install_miniconda("capiq_excel")
推荐阅读
- sharepoint-online - 需要在通过 SPFX 右键单击任何项目时使用上下文菜单实现流畅的 UI 详细信息列表
- datetime - 如何将 XML 日期转换为有效的日期时间?
- google-sheets-api - 通过 API 复制没有谷歌驱动器访问的谷歌电子表格
- sql - 表上授予选择的postgres语法错误
- python - 未找到任何参数的“编辑费用”的反向。尝试了 1 种模式:['edit\\-expense/(?P
[0-9]+)$'] - Django - swift - 每次调用时都想发出不同的音调
- javascript - 如何在 vue-class-component 中使用动态组件
- javascript - 检查对象是否具有数组中的键
- nestjs - 将提供者注入猫鼬模式
- xml - 如何定位命名空间 xsi:type="test1"