Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Richard 祝发兴 - -IT
opencv-python
提交
450fe457
O
opencv-python
项目概览
Richard 祝发兴 - -IT
/
opencv-python
与 Fork 源项目一致
Fork自
OpenCV / opencv-python
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv-python
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
450fe457
编写于
8月 12, 2016
作者:
O
Olli-Pekka Heinisuo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up the readme [skip ci]
上级
d06447c9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
34 deletion
+20
-34
README.rst
README.rst
+20
-34
未找到文件。
README.rst
浏览文件 @
450fe457
...
...
@@ -9,48 +9,40 @@
OpenCV on wheels
================
Unofficial
OpenCV
packages
for
Python
.
Work
in
progress
!
Unofficial OpenCV packages for Python. Work in progress!
The aim of this repository is to provide means to package each new
`
OpenCV
release
<
https
://
github
.
com
/
Itseez
/
opencv
/
releases
>`
__
for
the
`OpenCV release <https://github.com/
opencv
/opencv/releases>`__ for the
most used Python versions and platforms.
At the same time it allows anyone to build a custom version of OpenCV
for any Python version: just fork this repo and modify the build files
and scripts to fit your needs.
Why
?
----
Installation and Usage
----
------------------
1.
Installation
of
OpenCV
for
Python
is
pretty
hideous
:
To install this package
:
1.
Download
OpenCV
2.
Find
cv2
.
pyd
from
the
package
``pip install opencv-python``
-
If
it
exists
,
copy
it
to
the
root
of
Python
site
-
packages
-
If
it
does
not
exist
for
some
reason
for
your
setup
,
you
have
to
setup
the
build
environment
and
compile
it
manually
To import the package:
3.
Try
to
import
cv2
and
hope
it
works
``import cv2``
2.
Everyone
should
be
able
to
install
OpenCV
(
or
any
package
for
that
matter
)
with
pip
with
a
single
command
without
building
anything
3.
Python
`
wheels
<
http
://
pythonwheels
.
com
/>`
__
are
nice
,
we
should
use
them
more
`OpenCV documentation <http://docs.opencv.org/>`__
Documentation
Build process
-------------
The project is structured like a normal Python package with a standard
``
setup
.
py
``
file
.
The
build
process
is
as
follows
(
see
``
appveyor
.
yml
``):
``setup.py`` file. The build process is as follows (see
for example
``appveyor.yml``
file
):
1. Checkout repository and submodules
- OpenCV is included as submodule and the version is updated
manually
when
a
new
OpenCV
release
has
been
made
manually
by maintainers
when a new OpenCV release has been made
2. Find OpenCV version from the sources
3. Upgrade pip and install numpy for each Python version
...
...
@@ -62,18 +54,17 @@ The project is structured like a normal Python package with a standard
generate wheel
6. Install the generated wheels for each Python version
7. Test that the Python versions can import them
8.
TO
DO
:
upload
the
wheels
to
PyPi
8.
Use twine to upload all wheels to PyPI
Currently the ``find_version.py`` file parses OpenCV version information
from the OpenCV sources. OpenCV depends on numpy, so ``setup.py`` checks
the numpy version also with the help of pip.
As
described
earlier
,
for
example
the
``.
pyd
``
file
on
Windows
is
normally
copied
to
site
-
packages
.
To
avoid
polluting
the
root
folder
the
``
__init__
.
py
``
file
in
cv2
folder
handles
the
import
logic
correctly
by
importing
the
actual
``.
pyd
``
module
and
replacing
the
imported
cv2
package
in
``
sys
.
modudes
``
with
the
cv2
module
to
retain
backward
compatibility
.
The ``cv2.pyd`` file for example on Windows is normally copied to site-packages.
To avoid polluting the root folder the ``__init__.py`` file in cv2 folder
handles the import logic correctly by importing the actual ``.pyd`` module
and replacing the imported cv2 package in ``sys.modudes`` with the
cv2 module to retain backward compatibility.
Licensing
---------
...
...
@@ -126,7 +117,7 @@ Windows:
~~~~~~~~
There's a build time limitation (AppVeyor open source builds may take
max
.
1
hour
)
which
restricts
the
supported
Python
versions
to
two
.
As
max 1 hour) which restricts the supported Python versions to two. As
Python's 2.x releases are slowly approaching legacy state, 2.7.x
releases will be the only supported Python 2 versions on Windows. On
Python 3 side, builds will be run only for the latest release.
...
...
@@ -144,8 +135,3 @@ OS X
~~~~
TODO
..
|
buildstatus
|
image
::
https
://
ci
.
appveyor
.
com
/
api
/
projects
/
status
/
5
kjqpmvll5dwj5jd
?
svg
=
true
:
target
:
https
://
ci
.
appveyor
.
com
/
project
/
skvark
/
opencv
-
python
..
|
Build
Status
|
image
::
https
://
travis
-
ci
.
org
/
skvark
/
opencv
-
python
.
svg
?
branch
=
master
:
target
:
https
://
travis
-
ci
.
org
/
skvark
/
opencv
-
python
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录