Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions deeplabcut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@
# Licensed under GNU Lesser General Public License v3.0
#

try:
import PySide6
def main():
try:
import PySide6

lite = False
except ModuleNotFoundError:
lite = True
lite = False
except ModuleNotFoundError:
lite = True

# if module is executed directly (i.e. `python -m deeplabcut.__init__`) launch straight into the GUI
if not lite:
print("Starting GUI...")
from deeplabcut.gui.launch_script import launch_dlc
# if module is executed directly (i.e. `python -m deeplabcut.__init__`) launch straight into the GUI
if not lite:
print("Starting GUI...")
from deeplabcut.gui.launch_script import launch_dlc

launch_dlc()
else:
print(
"You installed DLC lite, thus GUI's cannot be used. If you need GUI support please: pip install 'deeplabcut[gui]''"
)
launch_dlc()
else:
print(
"You installed DLC lite, thus GUI's cannot be used. If you need GUI support please: pip install 'deeplabcut[gui]''"
)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def pytorch_config_paths() -> list[str]:
"Operating System :: OS Independent",
],
entry_points="""[console_scripts]
dlc=deeplabcut.__main__:main""",
deeplabcut=deeplabcut.__main__:main""",
)

# https://www.python.org/dev/peps/pep-0440/#compatible-release