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

質問編集履歴

4

画像追加

2020/08/01 04:51

投稿

ookura
ookura

スコア27

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,4 @@
76
76
  しかし、起動後に画像のエラーが発生して起動しませんでした・・・。
77
77
  もし可能であれば下記対処法もご教示いただけますと幸いです。
78
78
  度々甘えてしまい申し訳ありません
79
- ![イメージ説明](61fff267f3baf207d2bd4ac4a57c77b4.jpeg)
79
+ ![イメージ説明](3436745506f1538fe6e94d802cf7a0ed.jpeg)

3

画像追加

2020/08/01 04:51

投稿

ookura
ookura

スコア27

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,4 @@
76
76
  しかし、起動後に画像のエラーが発生して起動しませんでした・・・。
77
77
  もし可能であれば下記対処法もご教示いただけますと幸いです。
78
78
  度々甘えてしまい申し訳ありません
79
- ![![イメージ説明](f8bf9c0933b53a01454a53d47e5d53f1.jpeg)](a2325bc503848817b9819addda7a131b.jpeg)
79
+ ![イメージ説明](61fff267f3baf207d2bd4ac4a57c77b4.jpeg)

2

追記

2020/08/01 04:50

投稿

ookura
ookura

スコア27

title CHANGED
File without changes
body CHANGED
@@ -70,4 +70,10 @@
70
70
  executables = [exe]
71
71
  )
72
72
  # 'your_filename'は好みの名前でどうぞ。
73
- ```
73
+ ```
74
+ #再追記
75
+ numpyとpillowのバージョンを落とすことでexe化ができました!
76
+ しかし、起動後に画像のエラーが発生して起動しませんでした・・・。
77
+ もし可能であれば下記対処法もご教示いただけますと幸いです。
78
+ 度々甘えてしまい申し訳ありません
79
+ ![![イメージ説明](f8bf9c0933b53a01454a53d47e5d53f1.jpeg)](a2325bc503848817b9819addda7a131b.jpeg)

1

追記しました

2020/08/01 02:42

投稿

ookura
ookura

スコア27

title CHANGED
File without changes
body CHANGED
@@ -2,12 +2,72 @@
2
2
  https://genchan.net/it/programming/python/10325/
3
3
  を参考にさせていただいたのですが、下記エラーメッセージが出ます。
4
4
  #下記エラー
5
- error: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib
6
- from source to get the test data.
5
+ UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
6
+ "Distutils was imported before Setuptools. This usage is discouraged "
7
+ error: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.
7
8
 
8
9
  matplotlibが関係しているのでしょうか。対処方がわからず右往左往しています。
9
10
  不勉強で申し訳ありませんがどなたかご教示ください。
10
11
  よろしくお願いします。
11
12
 
12
13
  os:windows
13
- pycharm使用
14
+ pycharm使用
15
+ #追記
16
+ コードを全て記載したかったのですが文字数制限にひっかかってしまいました・・。
17
+ とりあえず中略で記載思します。
18
+
19
+ #ソースコード
20
+ ```ソースコード
21
+ # -*- coding: utf-8 -*-
22
+ import pyocr.builders
23
+ import os
24
+ import pyocr
25
+ import pyocr.builders
26
+ import cv2
27
+ import sys
28
+ import img2pdf
29
+ import subprocess
30
+ from tkinter import filedialog
31
+ import tkinter
32
+ import numpy as np
33
+ import matplotlib.pyplot as plt
34
+ import time
35
+
36
+ from PyQt5 import QtWidgets,QtCore
37
+ from PyQt5.QtWidgets import QInputDialog,QProgressBar, QPushButton, QRadioButton,QMessageBox,QLineEdit,QVBoxLayout,QTextEdit,QLabel
38
+ from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
39
+
40
+ import glob
41
+ from PIL import Image
42
+ import configparser
43
+
44
+ config =configparser.RawConfigParser()
45
+ ocr_f = True
46
+
47
+ class Application(QtWidgets.QWidget):
48
+ def __init__(self):
49
+
50
+ (文字数制限に引っかかって島しまい中略)
51
+ ```
52
+
53
+ #setup.py
54
+ ```
55
+ import sys
56
+ from cx_Freeze import setup, Executable
57
+
58
+ base = None
59
+
60
+ if sys.platform == "win32" : base = "Win32GUI"
61
+ # CUIの場合はこのif文をコメントアウトしてください。
62
+
63
+ exe = Executable(script = "OCR.py", base= base)
64
+ # "main.py"にはpygameを用いて作成したファイルの名前を入れてください。
65
+
66
+ setup(
67
+ name = 'your_filename',
68
+ version = '0.1',
69
+ description = 'converter',
70
+ executables = [exe]
71
+ )
72
+ # 'your_filename'は好みの名前でどうぞ。
73
+ ```