Are you running pysintaller from the activated venv? Does the program run properly from the activated venv?
If not, activate the venv, and install kivy per the directions on the web site.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/20381e3e-8d53-4fd7-ac51-43e8c7332ed7n%40googlegroups.com.
Uninstall: docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew;
Uninstall kivy
Then install kivy… it will install the appropriate dependencies:
python -m pip install "kivy[base]" kivy_examples
and give it a try.
In my experience the most useful errors are the errors in the kivy log file.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1198933c-b66e-4d1b-8801-dbb48ad5b230n%40googlegroups.com.
Wow that is frustrating.
Here is the location of the kivy log files: C:\Users\YourUserNane\.kivy\logs
It is normal for the Window to pop up and close when pyinstaller is running.
Looking at the top of the spec file you will see:
a = Analysis(['../main.py'],
pathex=[],
binaries=[],
datas=[('../*.kv', '.'),
('../Images/*.png', './Images')],
Is main.py the name of your main python code? If not change the name in your spec file.
The spec file uses relative paths and assumes the specfile is in a directory under the project directory.
I usually have a structure like this:
MYPROJECT – directory
MYProjectDist
W10.spec – the spec file
Images – Directory for Images
main.py – python and kv files are under MYPROJECT
my.kv
other.py
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b2b67f8d-bf6e-4c12-9d2a-868475968035n%40googlegroups.com.
I suspect we have a directories path issue…
C:\Users\marka\PythonEnv\Bovine25env\dist\Bovine25\kivy_install\data\glsl\default.png
Have you nested virtual environments?
FWIW here is the directory structure of a program I’m working on:
The full project path: C:\Users\ellio\PycharmProjects\ME-Surgeon
Note below the venv is a subdirectory of the project. It does not need to be.
As you can see, I put the spec files in ME-Dist. I switch to that directory to run pyinstaller.

To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ca4de402-883c-490f-a824-82b59d1316e7n%40googlegroups.com.
Because I put the spec file in ME-Dist, and cd to that directory to run pyinstaller, that is where the build and dist directories are created.
I would not recommend putting your code files in the venv directory. Make your venv a subdirectory of the project (as below) or just another directory. I put my code up on GitHub, but not the venv.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/42fae401-5b0e-4865-86ea-2221571f50c9n%40googlegroups.com.
You might want to find a resource on venv. I’m at a loss to suggest something useful.
I never cd into the venv.
I activate it from the working directory. I pip install from there.
I would put the spec file into CattleMgt-dist
Cd in CattleMgt-dist
Pyinstaller yourspecfile.spec
You will need to change the path as appropriate in your spec file if you spec file is not in the same dir as your .py files.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ef64bcda-d094-4558-b001-2c4c7ff12e9bn%40googlegroups.com.
On May 9, 2022, at 3:50 PM, markR <markandla...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/be0dff29-9d83-431f-8079-c49a1d8657ebn%40googlegroups.com.
Glad to hear you got it working!
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/3a4ed6b1-4d0f-4831-832b-df7582454583n%40googlegroups.com.