qdyxmas's Room

Done is better than perfect...

centos7安装gdal

sudo yum install postgresql postgresql-devel

#libkml Support
##---------This part is depending on prebuilt libraries. In the future we may replace this by compiling them from source.
wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-libkml-r864-64bit.tar.gz
tar xzf install-libkml-r864-64bit.tar.gz

#Copy these required files to  /usr/local
sudo cp -r install-libkml/include/* /usr/local/include
sudo cp -r install-libkml/lib/* /usr/local/lib
sudo ldconfig


#download GDAL
wget http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz

#Untar
tar xzf gdal-2.2.3.tar.gz
cd gdal-2.2.3

#Compile from source
./configure --with-libkml 
make
make install

阅读全文 »

CentOS7安装Docker python36的环境

CentOS7安装Docker python36的环境

1.安装docker

yum install -y docker  #安装docker
systemctl start docker #开启docker服务
docker pull python:3.6  #拉取python3.6的环境,没有其他的库的内容

2.配置Dockerfile文件 FORM python:3.6

RUN mkdir /python36_docker
WORKDIR /python36_docker
COPY requirements.txt /python36_docker/requirements.txt
RUN pip3 install requests
RUN pip3 install -r requirements.txt

3.创建docker images

docker build -t docker_python .

4.运行docker images

docker run  -itd docker_python:latest

5.进入容器

docker ps #查看启动的容器,选择启动的docker_python:latest的容器好进入
docker attach 9a90107e2003

参考链接:https://blog.csdn.net/qq_22211217/article/details/80414227 https://www.cnblogs.com/xuanmanstein/p/7630606.html https://baijiahao.baidu.com/s?id=1589924250945546299&wfr=spider&for=pc https://www.cnblogs.com/xhyan/p/6593075.html

阅读全文 »

unittest统计运行结果

runner = HTMLTestRunner.HTMLTestRunner(*****)
runResult = runner.run(suite)
passCount = runResult.success_count
errorCount = runResult.error_count
failureCount = runResult.failure_count``

阅读全文 »