Skip to content

Commit

Permalink
ignore automatically install modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Jan 4, 2023
1 parent 7afefc7 commit 5c88071
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
17 changes: 3 additions & 14 deletions ImportPhotos.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
import os
import uuid
import json
try:
import subprocess
except:
pass

# Import python module
CHECK_MODULE = ''
Expand All @@ -46,22 +42,15 @@

CHECK_MODULE = 'exifread'
except:
try:
subprocess.call(['pip', 'install', 'exifread'])
CHECK_MODULE = ''
except ModuleNotFoundError:
pass
CHECK_MODULE = ''

try:
if CHECK_MODULE == '':
from PIL import Image
from PIL.ExifTags import TAGS
CHECK_MODULE = 'PIL'
except:
try:
subprocess.call(['pip', 'install', 'pillow'])
CHECK_MODULE = ''
except ModuleNotFoundError:
pass
CHECK_MODULE = ''

FORM_CLASS, _ = uic.loadUiType(os.path.join(
os.path.dirname(__file__), 'ui/impphotos.ui'))
Expand Down
5 changes: 0 additions & 5 deletions code/PhotosViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
opencv = True
except:
opencv = False
try:
subprocess.call(['pip', 'install', 'opencv-python'])
opencv = True
except ModuleNotFoundError:
pass


class PhotosViewer(QGraphicsView):
Expand Down
4 changes: 2 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ repository=https://github.com/KIOS-Research/ImportPhotos/
# Recommended items:
# Uncomment the following line and add your changelog:
changelog=2023-01-04 ImportPhotos 3.0.5:
Automatically install some modules (exifread, pillow, opencv-python)
Add label space in the window of the photo
Show the photo in the tooltip window
Add label space in the window of the photo (show the title/name of the file more clearly)
Fix some issues with empty fields (Thanks @gaspermeister)
Fix python type error on photos viewer setGeometry (Thanks @faebebin)
Fix the error if the file in the Path field doesn't exist (Thanks @KrisRadowski, @turzik-x)
Expand Down

0 comments on commit 5c88071

Please sign in to comment.