質問編集履歴

3

追記

2021/09/22 05:46

投稿

shinchoroX
shinchoroX

スコア17

test CHANGED
File without changes
test CHANGED
@@ -138,6 +138,24 @@
138
138
 
139
139
 
140
140
 
141
+ import sys
142
+
143
+ import os
144
+
145
+ import pprint
146
+
147
+ print(sys.executable)
148
+
149
+ pprint.pprint(sys.path)
150
+
151
+ print(os.getenv('PYTHONPATH'))
152
+
153
+
154
+
155
+ を実行した場合の結果
156
+
157
+
158
+
141
159
  Thonny上での実行結果の表示
142
160
 
143
161
  ```

2

追記

2021/09/22 05:46

投稿

shinchoroX
shinchoroX

スコア17

test CHANGED
File without changes
test CHANGED
@@ -131,3 +131,61 @@
131
131
  $ sudo apt-get install libopencv-dev
132
132
 
133
133
  などをネットで調べて試したが解決しない。
134
+
135
+
136
+
137
+ ###頂いたアドバイスの実行結果
138
+
139
+
140
+
141
+ Thonny上での実行結果の表示
142
+
143
+ ```
144
+
145
+ /usr/bin/python3
146
+
147
+ ['/home/pi/Leasemat',
148
+
149
+ '/usr/lib/python37.zip',
150
+
151
+ '/usr/lib/python3.7',
152
+
153
+ '/usr/lib/python3.7/lib-dynload',
154
+
155
+ '/home/pi/.local/lib/python3.7/site-packages',
156
+
157
+ '/usr/local/lib/python3.7/dist-packages',
158
+
159
+ '/usr/lib/python3/dist-packages']
160
+
161
+ None
162
+
163
+ ```
164
+
165
+
166
+
167
+ systemdで実行させた場合でのターミナル上で systemctl status での表示
168
+
169
+ ```
170
+
171
+ 9月 22 14:37:07 raspberrypi systemd[1]: Started Leasemat Customer Counter System auto boot.
172
+
173
+ 9月 22 14:37:07 raspberrypi python3[1016]: /usr/bin/python3
174
+
175
+ 9月 22 14:37:07 raspberrypi python3[1016]: ['/home/pi/Leasemat',
176
+
177
+ 9月 22 14:37:07 raspberrypi python3[1016]: '/usr/lib/python37.zip',
178
+
179
+ 9月 22 14:37:07 raspberrypi python3[1016]: '/usr/lib/python3.7',
180
+
181
+ 9月 22 14:37:07 raspberrypi python3[1016]: '/usr/lib/python3.7/lib-dynload',
182
+
183
+ 9月 22 14:37:07 raspberrypi python3[1016]: '/usr/local/lib/python3.7/dist-packages',
184
+
185
+ 9月 22 14:37:07 raspberrypi python3[1016]: '/usr/lib/python3/dist-packages']
186
+
187
+ 9月 22 14:37:07 raspberrypi python3[1016]: None
188
+
189
+ 9月 22 14:37:07 raspberrypi systemd[1]: leasematCC.service: Succeeded.
190
+
191
+ ```

1

追記

2021/09/22 05:45

投稿

shinchoroX
shinchoroX

スコア17

test CHANGED
File without changes
test CHANGED
@@ -122,6 +122,10 @@
122
122
 
123
123
  pipでのインストールや
124
124
 
125
+ pip3 install opencv-python
126
+
127
+
128
+
125
129
  $ sudo apt-get install python-opencv
126
130
 
127
131
  $ sudo apt-get install libopencv-dev