我的工作环境配置

  • 安装R
  • 安装mirt
  • 配置vim
  • 安装python3
  • 安装pip 和pipenv
  • 安装 git
  • 免密码登录ssh

安装R

ref https://linuxize.com/post/how-to-install-r-on-centos-7/
配置源
sudo yum install epel-release
安装R
sudo yum install R
检查是否安装成功
R --version
将 Rscript 复制出来,主要是为了保证和mac 的位置一致

安装mirt

https://www.r-project.org/nosvn/pandoc/mirt.html

1 先安装 依赖
参考: http://www.mcclellandlegge.com/2017-02-21-installrdevel/
可能需要如下安装
sudo yum groupinstall -y "Development Tools" sudo yum install -y libcurl-devel openssl-devel libssh2-devel libxml2-devel
需要额外的 libxml2-devel

2. 进入R环境, 输入:
install.packages('devtools')

3. 安装mirt 在R环境中
library('devtools')

install_github('philchalmers/mirt')
4. 检查, 如果能安装导入如下模块就可以了
library(stats4)

library(lattice)

library(mirt)
5. 将 Rscript 复制出来,主要是为了保证和mac 的位置一致
whereis Rscript cp ..XXX 路径 .. /usr/local/bin/Rscript

ubuntu mint 参考

https://www.digitalocean.com/community/tutorials/how-to-install-r-packages-using-devtools-on-ubuntu-16-04

如果不行,那么就一一安装以下的包

Warning messages:

1: In install.packages("devtools") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘git2r’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘xml2’ had non-zero exit status
4: In install.packages("devtools") :
installation of package ‘rversions’ had non-zero exit status
5: In install.packages("devtools") :
installation of package ‘httr’ had non-zero exit status
6: In install.packages("devtools") :
installation of package ‘gh’ had non-zero exit status
7: In install.packages("devtools") :
installation of package ‘covr’ had non-zero exit status
8: In install.packages("devtools") :
installation of package ‘usethis’ had non-zero exit status
9: In install.packages("devtools") :
installation of package ‘roxygen2’ had non-zero exit status
10: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status

配置vim

coming soon

安装python3

https://linuxize.com/post/how-to-install-python-3-on-centos-7/
sudo yum -y install epel-release

sudo yum -y install python36

更改方法如下,但是千万不要改,因为 yum 不支持python3, 会有错误,
centos 千万不要改
https://stackoverflow.com/questions/11213520/yum-crashed-with-keyboard-interrupt-error

ubuntu 可以改
更改python 指向,
https://www.jianshu.com/p/9d3033d1b26f
默认的Python版本都为2.x, 如何改变Python的默认版本呢?假设我们需要把Python3.6设置为默认版本:
首先查看Python默认版本:
python --version
搜索系统是否已经安装Python3.6
whereis python3.6
如果结果里有/usr/bin/python3.6说明已经安装,如果没有则需要手动安装。
安装完成后,需要删除原有的Python连接文件
rm /usr/bin/python
然后建立指向Python3.5的软连接:
ln -s /usr/bin/python3.5 /usr/bin/python
之后把路径/usr/bin/加入环境变量PATH中:
PATH=/usr/bin:$PATH
现在输入python --version你就会发现python默认版本变为Python3.6了:)

安装pip 和pipenv

sudo yum -y install python36-pip

pip3 install pipenv

安装 git

coming soon

免密码登录ssh

http://www.micheledallatorre.it/blog/2009/01/10/how-to-save-ssh-passwords-in-terminal-on-linux-ubuntu/

http://mindclear.me/14874012084862.html

你可能感兴趣的:(我的工作环境配置)