Used pip for pyinstaller but pyinstaller still not recognized - python-3.x

Although I have used pip to get pyinstaller without any errors, command prompt tells me "'pyinstaller' is not recognized as an internal or external command, operable program or batch file." I also do not see any files named "pyinstaller" in my Scripts folder.
PATH seems to point to the right place. I can pip other packages successfully.

I have found the script. I located it by looking in the paths mentioned when I used pip. Then I had to place it in my already working PATH (which is just my Scripts folder in Python), and rename it to just "pyinstaller"

Related

I cannot run pyinstaller on my computer even though I have installed it

This is the problem right here, do you have any advice for that?
installed pip and pyinstaller, but still got this error message when I tried to convert my project into an .exe.
From Pyinstaller installation guide:
If you cannot use the pyinstaller command due to the scripts directory not being in PATH, you can instead invoke the PyInstaller module, by running python -m PyInstaller (pay attention to the module name, which is case sensitive). This form of invocation is also useful when you have PyInstaller installed in multiple python environments, and you cannot be sure from which installation the pyinstaller command will be ran.
So you may run it as e.g.:
python -m PyInstaller some_system.py
Or, as the issue seems that PATH Windows environment variable doesn't include Python's Script folder, it'd better to fix it. From the same guide:
If the command is not found, make sure the execution path includes the proper directory:
Windows: C:\PythonXY\Scripts where XY stands for the major and minor Python version number, for example C:\Python38\Scripts for Python 3.8)
To fix you may run where python to get exact location of Python on your machine (let's say it shows C:\Python38\). Then add to PATH env variable Scripts folder inside it (in this example it'd be C:\Python38\Scripts\)

pycharm and pyinstaller confusion

I have been writing .py scripts using PyCharm in Windows 10. I want to compile them into standalone .exe so I installed pyinstaller. I believe I made a mistake by installing it via the terminal inside PyCharm instead of cmd.
Pyinstaller was initially installed in C:\Users\myuser\PycharmProjects\routine\venv\Scripts
(\routine\ is the name of the project where I keep my scripts for tasks I do on a routine basis.)
When I DIR in \Scripts, I can see pyinstaller.exe
When I run pyinstaller from \Scripts, I get the following error:
Fatal error in launcher: Unable to create process using '"c:\users\myuser\pycharmprojects\routine tasks\venv\scripts\python.exe" "C:\Users\myuser\PycharmProjects\routine\venv\Scripts\pyinstaller.exe" ': The system cannot find the file specified.
If I try to run pyinstaller from a different directory, I get this message: "'pyinstaller' is not recognized as an internal or external command, operable program or batch file."
If I try to install pyinstaller from anywhere else, I get a bunch of messages saying "Requirement already satisfied: pyinstaller in c:\users\myuser\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages"
If I uninstall pyinstaller with pip and then reinstall it, I get this message "WARNING: The scripts pyi-archive_viewer.exe, pyi-bindepend.exe, pyi-grab_version.exe, pyi-makespec.exe, pyi-set_version.exe and pyinstaller.exe are installed in 'C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH."
If I add the specified directory to PATH I still get the same message.
Any idea what I am doing wrong here, or any suggestions as to how to fix this?

Pyreverse fails to generate any output files (png, jpg) other than .dot files

I am attempting to use pylint's pyreverse to generate uml diagrams of some .
When I run pyreverse from the command shell
pyreverse <modulename>
It executes just fine and returns a *.dot file as it should. If I attempt to use output options such as "-o png" I get the following error
>pyreverse -o png <modulename>
'c:\Program' is not recognized as an internal or external command,
operable program or batch file.
I am running python 3.6.5 and pylint 2.1.1.
I have installed graphviz 2.38 under C:\Programs and added the bin directory to my windows path.
I suspect pyreverse is recognizing some command as a command and a set of arguments (e.g. "C:\Program Files\blah blah" is being sent as a command to the windows interpreter as "C:\Program", but I do not know where, or how to fix it.
Can anyone offer any solutions?
That is a bug as the commenter suggested.
In the meanwhile, install graphviz, so that dot is on the path, then run
dot -Tpng classes.dot>result.png

Running pyinstaller in a command prompt returns "failed to create process"

I am trying to convert my python file into a .exe, and I found out about pyinstaller. I ran in the command prompt:pip install pyinstaller. After a few seconds, the last line said something like "pyinstaller was successfully installed" then when I am running just "pyinstaller" in the command prompt, it prints "failed to create process.". I tried running it in the directory with the scripts, I tried doing "pyinstaller myprogram.py" in the directory of my program. I even went to windows 10, "Advanced system settings" and added the directory of my python scripts, but it always returns this "failed to create process." I looked at other questions in stackoverflow. I even looked at the first lines of scripts of the pyinstaller but they already had quotes, so I do not know what is wrong.
Any reply would be appreciated.
It seems that this is a known issue with cx_Freeze which has been resolved in the source. It will be fixed in the new release (5.1.1)
I had the same issue so I checked the file
C:\Python27\Scripts\pyinstaller-script.py
and there was an old python path which when I installed python installer
C:\Python27\python.exe
But later I renamed python.exe --> python2.exe, so I just changed the path
C:\Python27\python.exe --> C:\Python27\python2.exe
in file
C:\Python27\Scripts\pyinstaller-script.py
and it worked perfectly.I would also suggest check you environemnt variables too carefully.

how to use the installed python package from command line on window 7

I download the external python package called morfessor and installed using pip install morfessor. To use the package there are command line commands such as morfessor-train, the syntax is:
morfessor-train --encoding=ISO_8859-15 --traindata-list --logfile=log.log -s model.bin -d ones traindata.txt
I tried by specifying the path into the folder where the commands are available,
as: C:\Python34\Scripts\Morfessor-2.0.3\scripts
the error here occur is "morfessor-train is not recognized as an internal and external command, operable program or batch file"
when I tried also using the python -m mofessor-train. but it said that "no module named morfessor-train"
how can run or use the commands from the command line to access the package?

Resources