【环境配置】Python基本环境安装

链接:https://share.weiyun.com/5MPB1ds 密码:egdsgq

1.python2 && python3 coexist

./configure
make all
make install
ln -s /usr/local/bin/python2.7 /usr/local/bin/python2
ln -s /usr/local/bin/python3.5 /usr/bin/python3
ln -s /usr/bin/python2.7 /usr/bin/python

2. tmux

yum -y install tmux

3. pip2

yum install python-pip
pip install -U pip
## 4. pytorch
python2: pip install torch torchvision

5. pip3

5.1 setuptools

tar -zxvf setuptools-23.1.0.tar.gz
cd setuptools-23.1.0
python3 setup.py install

5.2 pip3

gzip -dv pip-9.0.1.tar.gz       
tar xvf pip-9.0.1.tar
cd pip-9.0.1
python3 setup.py build
python3 setup.py install
ln -s /usr/local/bin/pip3 /usr/bin/pip3

6. rar

tar xf rarlinux-x64-4.2.0.tar.gz
cd rar
make install (modify makefile' inner variable: PREFIX=/usr instead of /usr/local/)

7.opencv

pip2 install opencv-python

8. python & gcc environment

yum install -y libevent-devel python-devel tkinter libffi-devel openssl-devel gcc

9. scipy & scikit-image & PIL

pip2 install scipy scikit-image
pip3 install Pillow

10. tensorflow-gpu-1.10.0 & pytorch

pip2(or pip3) install tensorflow-gpu
pip(or pip3) install torch torchvision 

11. caffe

reference1

11.1 dependencies

yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
yum install gflags-devel glog-devel lmdb-devel
yum install atlas-devel
cd /usr/lib64/atlas
sudo ln -sv libsatlas.so.3.10 libcblas.so
sudo ln -sv libsatlas.so.3.10 libatlas.so

11.2 make

cp Makefile.config.example Makefile.config
vim Makefile.config
/compute_20
comment lines contain compute_20, because we are using cuda-9.0
cd python
for req in $(cat requirements.txt); do pip install $req; done
vim Makefile.config
        USE_CUDNN := 1
        BLAS := atlas
        BLAS_INCLUDE := /usr/include/atlas
        BLAS_LIB := /usr/lib64/atlas
        PYTHON_INCLUDE := /usr/include/python2.7 \
                        /usr/lib64/python2.7/site-packages/numpy/core/include
        PYTHON_LIB := /usr/lib64
        USE_HDF5 := 1
make all -j8
make test -j8
make runtest -j8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值