I'm using the Python launcher on Windows to simplify version management and avoid modifying system path.
I've successfully installed a few packages:
> py -m pip list
Package Version
------------------ ---------
Brotli 1.0.9
certifi 2021.10.8
charset-normalizer 2.0.12
gallery-dl 1.21.1
idna 3.3
mutagen 1.45.1
pip 22.0.4
pycryptodomex 3.14.1
requests 2.27.1
setuptools 58.1.0
urllib3 1.26.9
websockets 10.3
yt-dlp 2022.4.8
They're all listed under Program Files/Python310/Scripts
:
but when I try to call them I get the following error:
> py -m gallery-dl
C:\Program Files\Python310\python.exe: No module named gallery-dl
unless I replace hyphens with underscores:
> py -m gallery_dl --help
usage: __main__.py [OPTION]... URL...
General Options:
...
This is quite different from when I wasn't using the launcher and had python in PATH and could just call gallery-dl
inside Powershell without:
- prepending
py -m
- which is fine - replacing hyphens with underscores - which is less fine because it sort of feels like I'm calling a raw function
- having the
__main__.py:
bit - which doesn't feel right either.
Is this the expected and proper behavior, or [am I doing / did I do] something wrong?