R 4.2.1安装
- R下载地址: https://mirrors.ustc.edu.cn/CRAN/
- 安装依赖:
1
2
3
4
5
6
7
8
9
10
11
12
13
14yum install libcurl-devel
yum install readline-devel
yum install libXt-devel
yum install bzip2-deve
yum install xz-devel.x86_64
yum install pcre-devel
yum install libpng-devel
yum install libtiff-devel
yum install libjpeg-turbo-devel
yum install pango-devel
# Ubuntu X11 dependencies
sudo apt-get install libx11-dev
sudo apt-get install xorg-dev - 编译安装:
1
2
3./configure --prefix=/opt/software/R --enable-R-shlib=yes --with-pcre1 --with-libpng --with-x
make
make install - R安装包:
- 安装CRAN下载的包:
install.packages("BiocManager")
*下载地址(可以下载某个版本的包): https://cran.r-project.org/src/contrib/Archive/ - 安装生信相关的包: *下载某个Bioconductor版本包的地址: http://bioconductor.org/about/release-announcements/
1
2
3if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SingleR") - 安装下载的包(当安装的包需要更高的gcc版本时可以下载低版本的包):
install.packages("/opt/KEGG.db_1.0.tar.gz",repos=NULL)
- 安装指定地址的包:
1
2url <- "https://cran.r-project.org/src/contrib/Archive/rvcheck/rvcheck_0.1.8.tar.gz"
install.packages(url, repos = NULL, type = "source") - 通过devtools安装:
1
2
3
4install.packages("devtools")
library(devtools)
install_version("edgeR", version = "3.14.0")
devtools::install_github("davidaknowles/leafcutter/leafcutter") - 通过remotes安装:
1
2install.packages("remotes")
remotes::install_github("LTLA/celldex")
- 安装CRAN下载的包:
- 包的管理:
1
2
3
4
5
6# 查看已安装的包
installed.packages()
# 查看包的版本
packageVersion("spatstat.core")
# 删除包
remove.packages("SingleR")
Python 3.9.14安装
- Python下载地址: https://www.python.org/downloads/
- 安装依赖:
1
2
3
4
5yum install libffi-devel
yum install tcl-devel
yum install tk-devel
yum install sqlite-devel
yum install gdbm-devel - 编译安装:
1
2
3./configure --prefix=/opt/software/python
make
make install - Python安装包:*下载python包地址(当下载速度慢或高版本编译出错时选择):
1
2
3python3 -m pip install numpy
python3 -m pip install pandas==2.0.1
pip install numpy.whl
https://pypi.tuna.tsinghua.edu.cn/simple/
https://www.lfd.uci.edu/~gohlke/pythonlibs/