teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

5

修正

2016/11/20 11:24

投稿

recode
recode

スコア31

title CHANGED
File without changes
body CHANGED
@@ -80,7 +80,7 @@
80
80
 
81
81
 
82
82
  ##追記2
83
- **64Bitに対応しているバージョンを入れて見ましたが、エラー起きていましました。**
83
+ **64Bitに対応しているバージョン(opencv: 2.4.10-np110py27_1)を入れて見ましたが、エラー起きていましました。**
84
84
 
85
85
  ```ここに言語を入力
86
86
  The following NEW packages will be INSTALLED:

4

バージョンを64に対応させた

2016/11/20 11:23

投稿

recode
recode

スコア31

title CHANGED
File without changes
body CHANGED
@@ -68,7 +68,7 @@
68
68
  [http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8](http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8)
69
69
  [http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a](http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a)
70
70
 
71
- ##追記
71
+ ##追記1
72
72
  **インストール先のopencvfileがおそらく対応していないosx-64のものしかなく、そこでのエラーかもしれませんでした。**
73
73
  **condaでOpenCV('2.4.10')をインストール**
74
74
  [https://anaconda.org/jjhelmus/opencv](https://anaconda.org/jjhelmus/opencv)
@@ -76,4 +76,54 @@
76
76
  conda install -c https://conda.binstar.org/jjhelmus opencv
77
77
  ```
78
78
 
79
- ![イメージ説明](b2fd86849d39f13870c6efad32659a86.png)
79
+ ![イメージ説明](b2fd86849d39f13870c6efad32659a86.png)
80
+
81
+
82
+ ##追記2
83
+ **64Bitに対応しているバージョンを入れて見ましたが、エラー起きていましました。**
84
+
85
+ ```ここに言語を入力
86
+ The following NEW packages will be INSTALLED:
87
+ opencv: 2.4.10-np110py27_1
88
+ ```
89
+
90
+ ```
91
+ opencv 2.4.10 np110py27_1
92
+ -------------------------
93
+ file name : opencv-2.4.10-np110py27_1.tar.bz2
94
+ name : opencv
95
+ version : 2.4.10
96
+ build number: 1
97
+ build string: np110py27_1
98
+ channel : defaults
99
+ size : 9.2 MB
100
+ date : 2015-10-06
101
+ fn : opencv-2.4.10-np110py27_1.tar.bz2
102
+ license : BSD
103
+ md5 : 6b4bb1b8a55a735d68c554aebf0d9970
104
+ priority : 0
105
+ schannel : defaults
106
+ url : https://repo.continuum.io/pkgs/free/linux-64/opencv-2.4.10-np110py27_1.tar.bz2
107
+ dependencies:
108
+ jpeg 8d
109
+ libpng 1.6.17
110
+ numpy 1.10*
111
+ python 2.7*
112
+ zlib 1.2*
113
+ ```
114
+
115
+ **コマンドからpythonを実行**
116
+ ```
117
+ >>> import cv2
118
+ >>> img = cv2.imread('ts.jpg')
119
+ >>> cv2.imshow('img',img)
120
+ ```
121
+
122
+ **エラー内容**
123
+ ```
124
+ OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp, line 501
125
+ Traceback (most recent call last):
126
+ File "<stdin>", line 1, in <module>
127
+ cv2.error: -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp:501: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage
128
+
129
+ ```

3

追記の修正

2016/11/20 11:22

投稿

recode
recode

スコア31

title CHANGED
File without changes
body CHANGED
@@ -68,9 +68,10 @@
68
68
  [http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8](http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8)
69
69
  [http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a](http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a)
70
70
 
71
- **追記**
71
+ ##追記
72
72
  **インストール先のopencvfileがおそらく対応していないosx-64のものしかなく、そこでのエラーかもしれませんでした。**
73
73
  **condaでOpenCV('2.4.10')をインストール**
74
+ [https://anaconda.org/jjhelmus/opencv](https://anaconda.org/jjhelmus/opencv)
74
75
  ```
75
76
  conda install -c https://conda.binstar.org/jjhelmus opencv
76
77
  ```

2

追記

2016/11/20 11:10

投稿

recode
recode

スコア31

title CHANGED
File without changes
body CHANGED
@@ -6,14 +6,17 @@
6
6
  さくらVPS
7
7
  CentOS release 6.8 (Final)
8
8
  Python 2.7.12 :: Anaconda custom (64-bit)
9
+
9
10
  ```
10
11
 
11
12
 
12
13
  ##実行方法
13
- **condaでOpenCVをインストール**
14
+ **condaでOpenCV('2.4.10')をインストール**
14
15
  ```
15
- # conda install -c https://conda.binstar.org/jjhelmus opencv
16
+ conda install -c https://conda.binstar.org/jjhelmus opencv
16
17
  ```
18
+ [https://anaconda.org/jjhelmus/opencv](https://anaconda.org/jjhelmus/opencv)
19
+
17
20
  **コマンドからpythonを実行**
18
21
  ```
19
22
  >>> import cv2
@@ -38,7 +41,7 @@
38
41
  anacondaの公式ページには下記のようにインストールするように書いてあったため、こちらの方法でも実行して見ました。
39
42
  OpenCVのインスールは以下のように実行しましたがうまくいきませんでした。
40
43
 
41
- **condaでOpenCVをインストール**
44
+ **condaでOpenCV(2.4.11)をインストール**
42
45
  ```
43
46
  conda install -c menpo opencv=2.4.11
44
47
  ```
@@ -63,4 +66,13 @@
63
66
 
64
67
  **参考にしたURL**
65
68
  [http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8](http://qiita.com/massaru129/items/8a1a75cdf713d4fa6bc8)
66
- [http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a](http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a)
69
+ [http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a](http://qiita.com/SE96UoC5AfUt7uY/items/ea5ad55736e3e9470b6a)
70
+
71
+ **追記**
72
+ **インストール先のopencvfileがおそらく対応していないosx-64のものしかなく、そこでのエラーかもしれませんでした。**
73
+ **condaでOpenCV('2.4.10')をインストール**
74
+ ```
75
+ conda install -c https://conda.binstar.org/jjhelmus opencv
76
+ ```
77
+
78
+ ![イメージ説明](b2fd86849d39f13870c6efad32659a86.png)

1

わかりやすく修正

2016/11/20 11:09

投稿

recode
recode

スコア31

title CHANGED
File without changes
body CHANGED
@@ -2,7 +2,7 @@
2
2
  pythonでopencvを動かそうとしているのですが、なかなかうまくいきません。
3
3
 
4
4
  ##実行環境
5
- ```ここに言語を入力
5
+ ```
6
6
  さくらVPS
7
7
  CentOS release 6.8 (Final)
8
8
  Python 2.7.12 :: Anaconda custom (64-bit)
@@ -31,17 +31,20 @@
31
31
  参考のURLでも良いのでもし解決策が分かる方がいれば、是非教えていただきたいです。
32
32
 
33
33
 
34
+
35
+
36
+
34
37
  ##違う方法でもうまくいきませんでした
35
38
  anacondaの公式ページには下記のようにインストールするように書いてあったため、こちらの方法でも実行して見ました。
36
39
  OpenCVのインスールは以下のように実行しましたがうまくいきませんでした。
37
40
 
41
+ **condaでOpenCVをインストール**
38
42
  ```
39
43
  conda install -c menpo opencv=2.4.11
40
44
  ```
41
45
 
42
46
  **コマンドからpythonを実行**
43
47
  ```
44
- python
45
48
  >>>import cv
46
49
  ```
47
50
  **エラー内容**