{"id":21794,"library":"pyshortcuts","title":"PyShortcuts","description":"Create desktop and Start Menu shortcuts for Python scripts on Windows, macOS, and Linux. Current version 1.9.7 (released March 2025). Active development, roughly 2-3 releases per year.","status":"active","version":"1.9.7","language":"python","source_language":"en","source_url":"https://github.com/newville/pyshortcuts/","tags":["shortcuts","desktop","menu","python-script","cross-platform"],"install":[{"cmd":"pip install pyshortcuts","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required only on Windows for creating shell links","package":"pywin32","optional":true},{"reason":"Optional, used for some icon handling examples","package":"numpy","optional":true}],"imports":[{"note":"No common wrong import.","wrong":null,"symbol":"make_shortcut","correct":"from pyshortcuts import make_shortcut"},{"note":"Changed in 1.9.3; get_desktop is now exported from the main package.","wrong":"from pyshortcuts.utils import get_desktop","symbol":"get_desktop","correct":"from pyshortcuts import get_desktop"}],"quickstart":{"code":"from pyshortcuts import make_shortcut\nfrom pyshortcuts import get_desktop\n\nscript = 'myscript.py'\ndesktop = get_desktop()\nmake_shortcut(script, name='MyScript', folder=desktop)\nprint('Shortcut created on desktop')","lang":"python","description":"Creates a desktop shortcut to a Python script."},"warnings":[{"fix":"Use Python 3.10 or newer.","message":"Python 3.10 is now required. Versions 1.9.6+ dropped support for Python 3.9 and earlier. Upgrade your Python environment if using older versions.","severity":"breaking","affected_versions":">=1.9.6"},{"fix":"Set script to the full path of the Python script and do not set 'exe'; or use the command-line -x flag.","message":"The 'noexe' argument in make_shortcut is deprecated since 1.9.1. Use 'script' as the full path with no exe.","severity":"deprecated","affected_versions":">=1.9.1"},{"fix":"Add terminal=True to make_shortcut or use -t on command line.","message":"On macOS, shortcuts may not open a terminal automatically unless the terminal app is properly configured. Use the -t flag or terminal=True argument to ensure a terminal window appears.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to 1.9.7 or pass the full path to the Python executable.","message":"When running inside a virtual environment, the executable path may not resolve correctly. Version 1.9.7 removes Path.resolve() to improve virtual environment support. If you experience issues, use the full path to the Python executable explicitly.","severity":"gotcha","affected_versions":"<1.9.7"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Upgrade to pyshortcuts>=1.9.3 or import from pyshortcuts.utils import get_desktop (deprecated).","cause":"Before version 1.9.3, get_desktop was not exported from the main package; it was in pyshortcuts.utils.","error":"AttributeError: module 'pyshortcuts' has no attribute 'get_desktop'"},{"fix":"Run 'pip install pyshortcuts' in the correct environment.","cause":"pyshortcuts is not installed, or the virtual environment is not activated.","error":"ImportError: No module named 'pyshortcuts'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}