Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

Liste des GroupesRevenir à cl python 
Sujet : Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution
De : jacob.kruger.work (at) *nospam* gmail.com (Jacob Kruger)
Groupes : comp.lang.python
Date : 31. Mar 2024, 13:20:45
Autres entêtes
Message-ID : <mailman.39.1711887660.3468.python-list@python.org>
References : 1
User-Agent : Mozilla Thunderbird
This started happening this past week, and, while it's worked fine in the past, the moment I try to launch the pyinstaller process at all, to generate compiled output, or even if just launch it with no command line options, I receive the following error message:
pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application
The full contents of the output string when I even try to just launch pyinstaller with no commands/arguments is the following:
Traceback (most recent call last):
   File "<frozen runpy>", line 198, in _run_module_as_main
   File "<frozen runpy>", line 88, in _run_code
   File "C:\pythonScripts\monitoring_nssm\venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 228, in _console_script_run
run()
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 170, in run
     parser = generate_parser()
^^^^^^^^^^^^^^^^^
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 136, in generate_parser
     import PyInstaller.building.build_main
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\build_main.py", line 28, in <module>
     from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\api.py", line 32, in <module>
     from PyInstaller.building.splash import Splash  # argument type validation in EXE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\splash.py", line 23, in <module>
     from PyInstaller.depend import bindepend
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\depend\bindepend.py", line 25, in <module>
     from PyInstaller.depend import dylib, utils
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\depend\utils.py", line 31, in <module>
     from PyInstaller.lib.modulegraph import modulegraph
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 34, in <module>
     from altgraph.ObjectGraph import ObjectGraph
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\altgraph\__init__.py", line 144, in <module>
     __version__ = pkg_resources.require("altgraph")[0].version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 952, in require
     needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 813, in resolve
     dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
   File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 854, in _resolve_dist
     raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application
# ---end of output---
I have tried completely removing python's installation, and, reinstalling it, but, same issue more or less immediately.
If I freeze pip's installed list within this specific virtual environment, it lists the following:
altgraph==0.17.4
packaging==24.0
pefile==2023.2.7
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
pywin32-ctypes==0.2.2
# ---end of requirements.txt---
And, if, just for testing, I launch python interpreter, and, ask it to import altgraph, it provides the same last line of error output?
If relevant, running with python 3.11.8, under windows 11 64-bit, and, can't think of anything that specifically occurred/changed this past week, besides normal things like windows updates, etc., but, don't really think that's likely to be relevant, unless something to do with pywin32 has caused an issue?
Should I try installing python 3.12 version instead and see if it changes?
Also, if relevant, while running under latest up-to-date version of windows 11 64 bit, have in any case enabled case-sensitivity on the folder I store all my python code in, just in case.
TIA
--
Jacob Kruger
+2782 413 4791
"Resistance is futile!...Acceptance is versatile..."

Date Sujet#  Auteur
31 Mar 24 o Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution1Jacob Kruger

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal