Fantastic - that did the trick:










*(venv) D:\Development\OEM-SR-Rules>pip install PyInstallerRequirement 
already satisfied: PyInstaller in 
d:\development\oem-sr-rules\venv\lib\site-packages (4.0)Requirement already 
satisfied: pyinstaller-hooks-contrib>=2020.6 in 
d:\development\oem-sr-rules\venv\lib\site-packages (from PyInstaller) 
(2020.7)Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform 
== "win32" in d:\development\oem-sr-rules\venv\lib\site-packages (from 
PyInstaller) (0.2.0)Requirement already satisfied: pefile>=2017.8.1; 
sys_platform == "win32" in 
d:\development\oem-sr-rules\venv\lib\site-packages (from PyInstaller) 
(2019.4.18)Requirement already satisfied: setuptools in 
d:\development\oem-sr-rules\venv\lib\site-packages (from PyInstaller) 
(49.2.0)Requirement already satisfied: altgraph in 
d:\development\oem-sr-rules\venv\lib\site-packages (from PyInstaller) 
(0.17)Requirement already satisfied: future in 
d:\development\oem-sr-rules\venv\lib\site-packages (from pefile>=2017.8.1; 
sys_platform == "win32"->PyInstaller) (0.18.2)WARNING: You are using pip 
version 20.1.1; however, version 20.2.2 is available.You should consider 
upgrading via the 'd:\development\oem-sr-rules\venv\scripts\python.exe -m 
pip install --upgrade pip' command.*



*(venv) D:\Development\OEM-SR-Rules>where 
PyInstallerD:\Development\OEM-SR-Rules\venv\Scripts\pyinstaller.exeC:\Users\CBOSTOCK\AppData\Local\Programs\Python\Python38\Scripts\pyinstaller.exe*

I regenerated the EXE and then:



*(venv) D:\Development\OEM-SR-Rules>dist\pyinst_excel.exe(venv) 
D:\Development\OEM-SR-Rules>                                    * <= No 
errors

I also tested my original program and that works too!

*One final question, if I may. I wish to go back to using the spec file. 
However I am unsure as to how PyInstaller manages it. According to the 
docs, the first thing it does is write the spec file. Do I have to use a 
non default name (with "--specpath=" ) to stop it overwriting my spec file 
or does it not overwrite it if it finds it is already there?*

Thanks,

Clive

On Monday, 17 August 2020 at 21:44:43 UTC+1 bwoodsend wrote:

> If python -m PyInstaller gives a No module named PyInstaller error then 
> your venv is a mess and PyInstaller is not in the correct environment. 
> Using python -m ... forces it to use the correct PyInstaller (which 
> doesn’t exist). The PyInstaller in your PATH presumably is left over from 
> some other old environment (use where PyInstaller to find out which) or 
> your root environment. 
>
> The fix is just to install PyInstaller in your venv using:
>
> venv\Scripts\activate
> pip install PyInstaller
>
> Verify that the 1st (or only) output from where PyInstaller now points 
> inside your venv/Scripts. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3325eb12-6a03-4165-a577-c3beb94bbd75n%40googlegroups.com.

Reply via email to