Skip to content

Can't run modules after installing with CLI #92219

@github-account1111

Description

@github-account1111

Bug report

I am only able to run the installed modules after installing Python with the GUI:

20220504-compress.mp4

Installing with the CLI using equivalent flags leads to errors when trying to install or run the modules:

> .\python-3.10.4-amd64.exe /passive `
>> InstallAllUsers=1 `
>> AssociateFiles=0 `
>> PrependPath=1 `
>> Include_doc=0 `
>> Include_dev=0 `
>> Include_lib=0 `
>> Include_tcltk=0 `
>> Include_test=0 `
>> Include_tools=0
PS C:\Users\user\Downloads> py -m pip install gallery-dl
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Program Files\Python310\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Program Files\\Python310\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.platlibdir = 'lib'
  sys.executable = 'C:\\Program Files\\Python310\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Program Files\\Python310\\python310.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Program Files\\Python310',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00000bfc (most recent call first):
  <no Python frame>

No matter what combination of flags, there is some error:

> .\python-3.10.4-amd64.exe /passive `
>> InstallAllUsers=1 `
>> AssociateFiles=0 `
>> PrependPath=1 `
>> Include_doc=0 `
>> Include_dev=0 `
>> Include_tcltk=0 `
>> Include_test=0 `
>> Include_tools=0
PS C:\Users\user\Downloads> py -m pip install gallery-dl
Collecting gallery-dl
  Downloading gallery_dl-1.21.2-py3-none-any.whl (495 kB)
     ---------------------------------------- 495.2/495.2 KB 10.3 MB/s eta 0:00:00
Collecting requests>=2.11.0
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     ---------------------------------------- 63.1/63.1 KB 3.3 MB/s eta 0:00:00
Collecting charset-normalizer~=2.0.0
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
     ---------------------------------------- 149.2/149.2 KB ? eta 0:00:00
Collecting idna<4,>=2.5
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     ---------------------------------------- 61.2/61.2 KB ? eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
     ---------------------------------------- 139.0/139.0 KB 8.6 MB/s eta 0:00:00
Installing collected packages: certifi, urllib3, idna, charset-normalizer, requests, gallery-dl
  WARNING: The script normalizer.exe is installed in 'C:\Program Files\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script gallery-dl.exe is installed in 'C:\Program Files\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed certifi-2021.10.8 charset-normalizer-2.0.12 gallery-dl-1.21.2 idna-3.3 requests-2.27.1 urllib3-1.26.9
PS C:\Users\user\Downloads> gallery-dl
gallery-dl : The term 'gallery-dl' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ gallery-dl
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (gallery-dl:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\user\Downloads> py -m gallery-dl
C:\Program Files\Python310\python.exe: No module named gallery-dl

Even if I literally put a =1 for every flag I get a no module error.

Your environment

  • CPython versions tested on: 3.10.4
  • Operating system and architecture: Windows 11 64-bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions