Closed w3333 closed 3 years ago
Ok, I had to install cython3 first, apparently. Maybe include that in the instructions? I have no idea what that is, and it seems it is not part of a standard install.
But then, the installation continues and fails later with that error: creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/tmp creating build/temp.linux-x86_64-3.6/tmp/pip-build-ms_u091l creating build/temp.linux-x86_64-3.6/tmp/pip-build-ms_u091l/ffpyplayer creating build/temp.linux-x86_64-3.6/tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer creating build/temp.linux-x86_64-3.6/tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/clib x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer -I/tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/includes -I/usr/include/python3.6m -c /tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/pic.c -o build/temp.linux-x86_64-3.6/tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/pic.o -O3 -fno-strict-aliasing -Wno-error In file included from /tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/pic.c:484:0: /tmp/pip-build-ms_u091l/ffpyplayer/ffpyplayer/includes/ffconfig.h:5:10: fatal error: SDL_version.h: Datei oder Verzeichnis nicht gefunden
^~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-ms_u091l/ffpyplayer/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-wmmm4wnv-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ms_u091l/ffpyplayer/
Now I have no idea what to do... Thanks.
https://kivy.org/doc/stable/gettingstarted/installation.html Usually it should just pick up on a compiled wheel for kivy unless your architecture is very unusual.
Did you try to apt-get the stuff suggested in INSTALL? particularly the SDL2 packages seem relevant here
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
Wow, thanks for the quick reply. Well, I tried the install command you gave here. Then the installation fails earlier... see below. I also tried the whole install command from the instructions, but that fails with "package libpulse cannot be found". I don't know, there's nothing unusual about my installation afaik (no dev machine or something). Just a plain Mint 19.3 (ok, I installed OpenCL for my AMD card a while back, not sure if that has anything to do with that).
Here the error after the install you posted: ` creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/tmp creating build/temp.linux-x86_64-3.6/tmp/pip-build-zjcnsxer creating build/temp.linux-x86_64-3.6/tmp/pip-build-zjcnsxer/ffpyplayer creating build/temp.linux-x86_64-3.6/tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer creating build/temp.linux-x86_64-3.6/tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer/clib x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/SDL2 -I/tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer -I/tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer/includes -I/usr/include/python3.6m -c /tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer/pic.c -o build/temp.linux-x86_64-3.6/tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer/pic.o -O3 -fno-strict-aliasing -Wno-error /tmp/pip-build-zjcnsxer/ffpyplayer/ffpyplayer/pic.c:487:10: fatal error: libavformat/avio.h: Datei oder Verzeichnis nicht gefunden
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-zjcnsxer/ffpyplayer/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-9sp3tkmn-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-zjcnsxer/ffpyplayer/ `
That solidly looks like a kivy error, probably best to ask in the discord: https://kivy.org/doc/stable/contact.html
Ok, I posted a message there. But could the underlying problem be related to the "libpulse package not found" error? That sounds important, no?
So, just for the record, I had to install libavformat-dev and libavdevice-dev. Now the compile errors are gone. Let's see what happens next :)
Unfortunately, still no luck. I can call katrain now, but this happens:
werner@linuxmint:~$ katrain
[INFO ] [Logger ] Record log in /home/werner/.kivy/logs/kivy_21-01-06_6.txt
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "/home/werner/.local/lib/python3.6/site-packages/kivy/init.py"
[INFO ] [Python ] v3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [ImageLoaderFFPy] Using ffpyplayer 4.3.2
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil, img_ffpyplayer (img_pygame ignored)
[INFO ] [Clipboard ] Provider: xclip
[INFO ] [CutBuffer ] cut buffer support enabled
[INFO ] [Text ] Provider: pil(['text_pygame'] ignored)
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
pygame - ModuleNotFoundError: No module named 'pygame'
File "/home/werner/.local/lib/python3.6/site-packages/kivy/core/init.py", line 62, in core_select_lib
fromlist=[modulename], level=0)
File "/home/werner/.local/lib/python3.6/site-packages/kivy/core/window/window_pygame.py", line 13, in
x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11' File "/home/werner/.local/lib/python3.6/site-packages/kivy/core/init.py", line 62, in core_select_lib fromlist=[modulename], level=0)
[INFO ] [KivyMD ] v0.104.1 [CRITICAL] [App ] Unable to get a Window, abort.
Still kivy issues. Is mint a particularly minimalistic distro to have so few dependencies installed and such an old python?
Actually Mint comes with lots of stuff that other distros don't have in the install, like 3rd party codecs and such. It's directly derived from the latest Ubuntu LTE (in my case 18.04). I never had issues. My package manager says python3-kivy is installed. Such a shame, I'd really like to use KaTrain. Is there an AppImage or something like that?
What would you suggest? Is Manjaro better? Thinking of switching anyway.
I've just used ubuntu forever, just since it's so mainstream.
What happens when you
Sorry, that's a bit above my paygrade... (I was a dev once, but I have no clue about python). Set KIVY_WINDOW in my bash_profile? And how to make a clean pyenv?
Just literally run KIVY_WINDOW=sdl2 katrain
- in bash you can specify env vars before a command.
Never mind about the pyenv if you're not into python, it can be a bit tricky. But I would kind of expect the apt package to be 3.7/3.8 by now.
Thanks for the info. Same issue with the env var.
katrain -d
is another option to get the debug logs from kivy
That says:
[INFO ] [Logger ] Record log in /home/werner/.kivy/logs/kivy_21-01-06_8.txt
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "/home/werner/.local/lib/python3.6/site-packages/kivy/init.py"
[INFO ] [Python ] v3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 186 symbols loaded
[DEBUG ] [Cache ] register
x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11' File "/home/werner/.local/lib/python3.6/site-packages/kivy/core/init.py", line 62, in core_select_lib fromlist=[modulename], level=0)
[INFO ] [KivyMD ] v0.104.1 [CRITICAL] [App ] Unable to get a Window, abort.
What's pygame...?
Installed both "python-pygame" and "python-pygame-sdl2", but same error.
kivy is a generic gui library which uses one of several 'backends' for the visuals, including sdl2, pygame, and I suppose X11. Of these, SDL2 tends to be best.
[INFO ] [Kivy ] v2.0.0
is a good sign.
After installing all these packages you could try pip uninstall kivy
and then pip install kivy
to recompile.
Is it a problem (with some scripts or whatever...) that I need to write "pip3" instead of "pip"? When I call pip, it uses Python2.
Yes it means you have an old OS which hasn't gotten the memo that python2 was deprecated long ago.
But I mean, does it matter? Does somewhere, someone call "pip" directly? Or is it just that I call pip3 instead and everything should be ok?
The uninstall/install didn't work as well.
I would upgrade to Mint 20 (based on Ubuntu 20.04), but I ran into issues last time I tried. 20.1 should be out soon though. I'll try again, maybe even use the current beta.
Such a shame, KaTrain looks really promising!
I also tried in a Win10-VM today, could install and run but there I ran into different issues... doesn't start the analysis. But that's a different question for a different day :)
Can you make an AppImage to avoid all that? I have no idea how difficult that is.
pip3 should be fine, typically. I've never tried making an AppImage, but believe it or not, on linux this program usually installs very easily with a single pip install command!
That's really interesting... I never had any major problems with Mint 19. Ok, not the latest model, but still supported. Do you know of people installing it on Mint 19? There should be hundreds of thousands out there.
Which Ubuntu version are you running?
Thanks, by the way, for the extensive support!
I run ubuntu 20.04. Honestly I'd never heard of mint!
It's actually more popular than Ubuntu itself. According to DistroWatch, but also from experience. I could never get used to Ubuntu, but Mint... like Windows, only better!
I'll give the new Mint a try, that has Ubuntu 20.04 as its base. Not sure what else to try now... I could set up some VMs first and see if it installs fine, and then make the switch. Hm. Anyway, great work and thanks for all the help. If you have any more ideas, let me know.
Hello,
followed your instructions, but then I get an error ... see here. I have Python3 V3.6.9. Any ideas? `werner@linuxmint:~$ pip3 install katrain Collecting katrain Using cached https://files.pythonhosted.org/packages/f5/54/93770a11241f051b89f070310eae9ba254fbf4836e2235099abbcc926ff4/KaTrain-1.7.0-py3-none-any.whl Collecting urllib3 (from katrain) Downloading https://files.pythonhosted.org/packages/f5/71/45d36a8df68f3ebb098d6861b2c017f3d094538c0fb98fa61d4dc43e69b9/urllib3-1.26.2-py2.py3-none-any.whl (136kB) 100% |████████████████████████████████| 143kB 2.7MB/s Collecting screeninfo; platform_system != "Darwin" (from katrain) Downloading https://files.pythonhosted.org/packages/34/9b/b5e28dbae82d2785acf9aa49cc0a442b77559b35c6b2b430ddff470e959c/screeninfo-0.6.7.tar.gz Collecting importlib-resources; python_version < "3.7" (from katrain) Downloading https://files.pythonhosted.org/packages/e1/44/a4d7387e5207e66e567c04f87b652a9a174335043838ee7f85ef05f28945/importlib_resources-4.1.1-py3-none-any.whl Collecting setuptools (from katrain) Downloading https://files.pythonhosted.org/packages/34/b6/33396512781ec5c40de2e70e8a68f2d0c4d91d6cc182410788c34a00002d/setuptools-51.1.1-py3-none-any.whl (2.0MB) 100% |████████████████████████████████| 2.0MB 876kB/s Collecting wheel (from katrain) Downloading https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl Collecting kivy[full]>=2.0.0 (from katrain) Using cached https://files.pythonhosted.org/packages/12/96/091ddacafb84dd18555a32d860dbfaf9c806147aa30c6f3c8b93cb7bab97/Kivy-2.0.0.tar.gz Complete output from command python setup.py egg_info: [INFO ] [Logger ] Record log in /home/werner/.kivy/logs/kivy_21-01-06_2.txt [INFO ] [Kivy ] v2.0.0 [INFO ] [Kivy ] Installed at "/tmp/pip-build-wm6uxo9k/kivy/kivy/init.py" [INFO ] [Python ] v3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-build-wm6uxo9k/kivy/setup.py", line 370, in
import Cython
ModuleNotFoundError: No module named 'Cython'
Current directory is: /tmp/pip-build-wm6uxo9k/kivy
Source and initial build directory is: /tmp/pip-build-wm6uxo9k/kivy
Python path is:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wm6uxo9k/kivy/ werner@linuxmint:~$ which python3 /usr/bin/python3 werner@linuxmint:~$ which python3 /usr/bin/python3 werner@linuxmint:~$ which python /usr/bin/python werner@linuxmint:~$ `