Trying to make an executable python module into an .exe using pyinstaller. So I
- created an environment:
c:\Python39\python.exe -m venv %DIR_BASE%, - activated it:
%DIR_BASE%\scripts\activate, and finally - wrote a
requirements.txtincluding the linejsonschema, saying python -m pip install -r requirements.txt
Now the master command accessing the pyinstaller.exe. that per se knows nothing
of the new environment beyond the -p parameter I give it, and which I hoped would suffice:
C:\python39\scripts\pyinstaller
-p "X:\paws\src\shared\python;X:\paws\PyEnv\Py39\Lib\site-packages;
X:\paws\PyEnv\Py39\Lib\site-packages\jsonschema;
X:\paws\PyEnv\Py39\Scripts"
-n ptGui
%DIR_BASE%\prototype_gui\__main__.py
Alas, I got:
File "c:\python39\lib\site-packages\pkg_resources\__init__.py", line 785, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found
and is required by the application
However, I am pretty positive that the environmental(!) installation of that package succeeded:
(Py39) X:\paws\PyEnv\Py39\Lib\site-packages>ls -1 | grep jsonschema
jsonschema
jsonschema-3.2.0.dist-info
Pretty sure that is some beginners misconception. Does anyone of you see it, and would tell me how to do it right?