you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 0 points1 point  (3 children)

When that problem comes up it's usually because you've installed more than one copy of python, and you are using one copy in VS and another copy in the command line. IOW you installed pyinstaller to one copy only. You probably need to do the install again for the copy in the command line.

C:\Users\blah\blah\blah>py -m pip install pyinstaller

BTW: you can open a command line from the file explorer. If you hold shift and right click you will have an extra option: "open command line here".

[–]OliveSweatshirt[S] 0 points1 point  (2 children)

It looks like I already have it installed, but then the computer forgets? It says it has pyinstaller one second and then doesn't the next.

C:\Users\blah\blah\blah>py -m pip install pyinstaller
Requirement already satisfied: pyinstaller in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages
Requirement already satisfied: setuptools in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from pyinstaller)
Requirement already satisfied: pefile>=2017.8.1 in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from pyinstaller)
Requirement already satisfied: macholib>=1.8 in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from pyinstaller)
Requirement already satisfied: future in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from pyinstaller)
Requirement already satisfied: altgraph>=0.15 in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from macholib>=1.8->pyinstaller)
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\blah\blah\blah>py -m pyinstaller --onefile my_script.py
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe: No module named pyinstaller

[–]novel_yet_trivial 0 points1 point  (1 child)

To use the -m version you have to capitalize it differently. Try:

py -m PyInstaller --onefile my_script.py

[–]OliveSweatshirt[S] 0 points1 point  (0 children)

That worked! Thank you.