ubuntu下配置imgaug及安装opencv-python

imgaug库是一个封装好的用来进行图像增强的python库,项目链接

本文介绍了在ubuntu上成功安装imgaug。

先参考博文链接安装,该文都是连网用pip安装,但是我是服务器不能联网,通过conda进行安装。

依次安装:six numpy scipy Pillow matplotlib scikit-image imageio Shapely是没问题的,但是安装opencv-python显示


Fetching package metadata .............

PackageNotFoundError: Package missing in current linux-64 channels:
  - opencv-python

按照网上的解决方法:conda install --channel https://conda.anaconda.org/menpo opencv3,是可以成功安装opencv,但是在安装imgaug时,仍然报错找不到opencv-python,所以只能想办法安装opencv-python包,我采用的解决方法是:在官网下载对应版本的opencv-python,放在./home下,即/home/opencv_python-4.1.0.25-cp36-cp36m-manylinux1_x86_64.whl,然后

pip install opencv_python-4.1.0.25-cp36-cp36m-manylinux1_x86_64.whl

成功安装。接下来安装imgaug,在项目官网下载imgaug的压缩文件,在/home/imgaug-master.zip下执行:

pip install imgaug-master.zip

成功安装。验证:

ubuntu:~$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import imageio
>>> import imgaug as ia
>>> exit()

 

你可能感兴趣的:(imgaug安装,opencv-python安装)