Python获取开发环境信息

我的开发环境是Ubuntu16.04,下面的函数打印我的开发环境信息。
项目位置:OpenCV-Sample
0-SystemInfo.py

import cv2
import platform

print("OS : ", platform.system())
print("platform : ", platform.platform())
print("version : ", platform.version())
print("arch : ", platform.architecture())
print("machine : ",  platform.machine())
print("name : ", platform.uname())
print("python vision : ", platform.python_version())
print("OpenCV Version : ", cv2.__version__)

输出:

OS :  Linux
platform :  Linux-4.15.0-34-generic-x86_64-with-debian-stretch-sid
version :  #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018
arch :  ('64bit', 'ELF')
machine :  x86_64
name :  uname_result(system='Linux', node='king-desktop', release='4.15.0-34-generic', version='#37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018', machine='x86_64', processor='x86_64')
python vision :  3.5.2
OpenCV Version :  3.4.1

猜你喜欢

转载自blog.csdn.net/kingroc/article/details/83000256