美文网首页
python+opencv环境搭建

python+opencv环境搭建

作者: 碧影江白 | 来源:发表于2017-11-03 16:37 被阅读52次

在cmd中输入命令:
pip install --upgrade setuptools
pip install numpy Matplotlib
pip install opencv-python

即可
网络原因报错的话需要重新设置源网址:

import os

ini="""[global]
index-url = https://pypi.doubanio.com/simple/
[install]
trusted-host=pypi.doubanio.com
"""
pippath=os.environ["USERPROFILE"]+"\\pip\\"

if not os.path.exists(pippath):
    os.mkdir(pippath)

with open(pippath+"pip.ini","w+") as f:
    f.write(ini)

教程:http://www.cnblogs.com/lclblack/p/6377710.html

相关文章

网友评论

      本文标题:python+opencv环境搭建

      本文链接:https://www.haomeiwen.com/subject/tiwtmxtx.html