R语言学习
R源码安装常见报错及更换package安装源
统计检验应用
卡方检验案例应用
linux本地安装ggplot2
shell脚本中运行R代码
conda构建虚拟环境
karyoploteR基因组数据可视化
Linux环境中R语言绘图问题
【实用】Bioconductor的正确使用
本文档使用 MrDoc 发布
-
+
up
down
首页
conda构建虚拟环境
# 安装conda # 配置 配置文件`~/.condarc`文件内容如下: ``` channels: - defaults show_channel_urls: true default_channel_urls: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ ssl_verify: true channel_priority: flexible report_errors: true ``` 安装系统时用的conda,Miniconda3 ``` channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - genomedk - conda-forge - bioconda - defaults ``` # 构建虚拟环境 ``` conda create -n renv r-base=4.2.0 conda activate renv conda list ``` **报错**:conda list时报错: ``` ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_cos7_linux_gnu' ``` 问题的出现原因定位为:在某一个版本的python中丢失了一个备份文件,通常在同一个版本的python下会有两个相同的_sysconfigdata_x86_64_conda_cos7_linux_gnu.py文件和_sysconfigdata_x86_64_conda_linux_gnu.py文件。而在某些程序的运行过程中会依赖于其中的一个,因此我们需要做的就是检索系统中是否存在有这两个文件: ``` $ sudo find ~ -name _sysconfigdata_x86_64* [sudo] dechin 的密码: /home/dechin/anaconda3/lib/python3.8/_sysconfigdata_x86_64_apple_darwin13_4_0.py /home/dechin/anaconda3/lib/python3.8/__pycache__/_sysconfigdata_x86_64_apple_darwin13_4_0.cpython-38.pyc /home/dechin/anaconda3/lib/python3.8/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py ``` 这儿发现目录有哪个就,给他复制一个该缺失的名称文件。 ## 删除虚拟环境 ``` conda remove --name 环境名称 --all ``` # 安装R包 ``` install.packages("BiocManager") install.packages("BiocManager", repos = "https://cran.rstudio.com/") BiocManager::install("ExomeDepth") ``` # conda安装软件常见问题 ## 常见问题1 ### 问题展示 ``` Collecting package metadata (current_repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source. Collecting package metadata (repodata.json): done Collecting package metadata (repodata.json): done ``` 此错误表明 `conda` 在解析和安装依赖包时遇到了问题,可能是由于包冲突、过时的通道、环境配置不当等原因。 ### 原因 当 `conda` 尝试安装包时,它会进行依赖关系的解析。此过程中,它需要通过不同的元数据(`repodata.json` 或 `current_repodata.json`)来确定包的版本和依赖关系。导致安装失败的常见原因包括:  ### 解决
laihui126
2024年12月27日 08:53
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅道文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅道文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅道文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
下载Markdown文件
分享
链接
类型
密码
更新密码