๊ธฐ๋ฅ ์์ฒญ์ด ๋ฌธ์ ์ ๊ด๋ จ๋์ด ์์ต๋๊น?
Kivy๋ ๋์๊ฒ ๋๋ฌด ํ๋ฅญํฉ๋๋ค! ๊ทธ๋ฌ๋ ๋๋ python 3.8 ๋ฐ 3.9์ ๋ํ ํ ์ด ์๋ค๋ ๊ฒ์ ์ข์ ํ์ต๋๋ค.
์ํ๋ ์๋ฃจ์
์ค๋ช
python3.8 ๋ฐ 3.9 ํ ์ pip์ ์ฌ์ฉํ ์ ์๋๋ก ํฉ๋๋ค.
๊ณ ๋ คํ ๋์์ ๊ธฐ์ ํ์ญ์์ค.
์์
์ถ๊ฐ ์ปจํ
์คํธ
์์
ํธ๊ธฐ์ฌ์ ์์ค ์ฝ๋์์ ์ค์นํ๋ ๊ฒ์ด python 3.8์์ ์๋ํฉ๋๊น?
์ด, ์๋ํ์ง ์์์ต๋๋ค. ๐
๋ถํํ๋ ์์ ์ ์ธ ๋ฆด๋ฆฌ์ค๋ฅผ ์ํ python 3.8์ฉ ํ ์ด ์์ต๋๋ค. ์๋ํ์ง๋ง ๋ ์ด์ ์์ฑํ ํญ๋ชฉ์ด ์์ต๋๋ค.
๊ทธ๋ฌ๋ ๋ง์คํฐ๋ฅผ ์ฌ์ฉํ๋ ค๋ ๊ฒฝ์ฐ 3.8์ ์ฌ์ฉํ ์ ์๋ ์๋ฒฝํ๊ฒ ์ข์ ํ ์ด ์์ผ๋ฉฐ ์ค์ ๋ก ์ค์น๊ฐ ์๋นํ ๋จ์ํ๋์์ต๋๋ค. ์ค์ํ ๊ฒ์ 2๋จ๊ณ ์์ pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
๋ฅผ ์ฌ์ฉํ์ฌ pypi์์ ์ฌ์ฉํ ์ ์๊ธฐ ๋๋ฌธ์ ์๋ฒ์์ kivy๋ฅผ ๊ฐ์ ธ์ค๋ ๊ฒ์
๋๋ค.
pypi์ ์ถ๊ฐํ๋ ค๋ฉด ์ ๋ฆด๋ฆฌ์ค๋ฅผ ๋ง๋ค์ด์ผ ํ์ง๋ง ์ง๊ธ์ ์นด๋์ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
@matham ์ ์ ํ ์ถ์๋ฅผ
ํ์ฌ ๋ถ์กฑํ ๊ฐ๋ฐ์์ ์๊ฐ๊ณผ ๋ ธ๋ ฅ.
๊ทธ๋์ ๊ทธ๊ฒ์ ๊ณ ์น๋ ๋ฐฉ๋ฒ
๋๊ตฐ๊ฐ ์ฌ์ ํ Windows ์ด์ ์ฒด์ ์์ Python 3.8 ์ฉ Kivy ๋ฅผ ์ค์นํ ์ ์๋ค๋ฉด https://www.lfd.uci.edu/~gohlke/pythonlibs/ ์์ ๋ค์ด๋ก๋ํ์ฌ Kivy๋ฅผ ์ฐพ์ ๊ฒ์ ์ ์ํฉ๋๋ค. Kivyโ1.11.1โcp38โcp38โwin_amd64.whl
.. python 3.8, Windows OS x64๋ฅผ ์๋ฏธํฉ๋๋ค.
pip install Kivyโ1.11.1โcp38โcp38โwin_amd64.whl
(์์ )
pip install kivy [๊ธฐ๋ณธ] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
๋ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐ, ๊ฐ์ฌํฉ๋๋ค
์ง๊ธ์ 10์์
๋๋ค. Python 3.8์ฉ Kivy์ ํ ์ค์น ์ธก๋ฉด์์ ๋ณ๊ฒฝ ์ฌํญ์ด ์์ต๋๊น?
์ ๋ Ubuntu 20.04๋ฅผ ์ฌ์ฉ ์ค์ด๋ฉฐ ์์์ ์ธ๊ธํ ์๋ฃจ์
์ด ์ ์๊ฒ ํจ๊ณผ๊ฐ ์์์ต๋๋ค. W10 ์ ์ฉ์ด๊ธฐ ๋๋ฌธ์ผ ์ ์์ต๋๋ค.
ํ์ฌ ๋ด ์ปดํจํฐ์์ pip3 install kivy
์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
```
ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```
๋น๋ถ๊ฐ ์ ๋ Python 3.6์ผ๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ์ต๋๋ค. ๊ทธ๋ ๊ฒ ํฐ ์ฐจ์ด๋ฅผ ๋ณด์ด์ง ์์ ๊ฒ ๊ฐ์์.
Kivy์ ์ ์ฌ์ ์ธ ์ ๊ท ์ด๋ฏผ์๋ก์, ์ ๋ ์ด๋ฌํ ์ง์ ๋ถ์กฑ์ผ๋ก ์ธํด ์ ๋ง ์ง๊ฒน์ต๋๋ค. ์ด๊ฒ์ด ์๋ก์ด ์ฌ์ฉ์๋ฅผ ๋ง์ดํ๋ ๋ฐฉ๋ฒ์
๋๊น? ๋ช
๋ฐฑํ ์ฒซ ๋ฒ์งธ ๋จ๊ณ๋ pip install kivy
์ด๊ณ ๊ทธ ๋ค์์๋ ์๋ํ์ง ์๋ ์ด์ ๋ฅผ ์ดํด๋ด์ผ ํฉ๋๋ค.
์ฐ๋ฆฌ๋ ๋ชจ๋ ์ฃผ์ ์ด์ ์ฒด์ ๋ฅผ ์ง์ํฉ๋๋ค
https://kivy.org/doc/stable/philosophy.html
๊ทธ๋ฌ๋ ํ์ฌ ๋ฒ์ (Ubuntu LTS์ ๊ฐ์)์ ์๋๋๋ค.
๋ถ์ ํ ํ์๊ฐ ์์ต๋๋ค. ์ฐ๋ฆฌ๋ ๋ชจ๋ ๊ฐ์ธ์ ์ธ ์๊ฐ์ ์ฌ๊ธฐ์์ ์ ์๋ก ์ผํ๊ณ ์์ต๋๋ค. ๋์์ ์ธ์ ๋ ํ์ํฉ๋๋ค. ํ ์ผ์ด ๋ง์ต๋๋ค.
Kivy๋ Ubuntu 20.04์์ ์ ๋์ ์ผ๋ก ์๋ํ๋ฉฐ ๋ฌธ์๋ ์ด๋ฅผ ๋ฐ์ํ๋๋ก ์ ๋ฐ์ดํธํ ์ ์์ต๋๋ค.
gabriel<strong i="7">@gryphon</strong>:~> docker run -it ubuntu:20.04 bash
root<strong i="8">@6599fa0c0d81</strong>:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
[โฆ]
Reading state information... Done
30 packages can be upgraded. Run 'apt list --upgradable' to see them.
root<strong i="9">@6599fa0c0d81</strong>:/# apt install python3.8 python3-pip -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
[โฆ]
done.
root<strong i="10">@6599fa0c0d81</strong>:/# python3.8 -m pip install --pre kivy[full]
Collecting kivy[all]
Downloading Kivy-2.0.0rc3-cp38-cp38-manylinux2010_x86_64.whl (22.0 MB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 22.0 MB 13 kB/s
WARNING: kivy 2.0.0rc3 does not provide the extra 'all'
Collecting pygments
Downloading Pygments-2.7.1-py3-none-any.whl (944 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 944 kB 5.6 MB/s
Collecting docutils
Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 548 kB 5.1 MB/s
Collecting Kivy-Garden>=0.1.4
Downloading kivy-garden-0.1.4.tar.gz (6.8 kB)
Collecting requests
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 61 kB 459 kB/s
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 133 kB 9.6 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 156 kB 13.4 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 127 kB 5.0 MB/s
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 58 kB 5.6 MB/s
Building wheels for collected packages: Kivy-Garden
Building wheel for Kivy-Garden (setup.py) ... done
Created wheel for Kivy-Garden: filename=Kivy_Garden-0.1.4-py3-none-any.whl size=4531 sha256=40c7f88731f91c2bb078133980911f6b7a9415ac1398a2eb65a16ed605b468c7
Stored in directory: /root/.cache/pip/wheels/d2/72/1a/9ddd17f00755707937caa350616965fb3330a6270425f397e6
Successfully built Kivy-Garden
Installing collected packages: pygments, docutils, chardet, certifi, urllib3, idna, requests, Kivy-Garden, kivy
Successfully installed Kivy-Garden-0.1.4 certifi-2020.6.20 chardet-3.0.4 docutils-0.16 idna-2.10 kivy-2.0.0rc3 pygments-2.7.1 requests-2.24.0 urllib3-1.25.10
root<strong i="11">@6599fa0c0d81</strong>:/# python3.8
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kivy
[WARNING] [Config ] Older configuration version detected (0 instead of 21)
[WARNING] [Config ] Upgrading configuration in progress.
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_20-10-08_0.txt
[INFO ] [Kivy ] v2.0.0rc3, git-20c14b2, 20200615
[INFO ] [Kivy ] Installed at "/usr/local/lib/python3.8/dist-packages/kivy/__init__.py"
[INFO ] [Python ] v3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3.8"
>>>
๊ณ ๋ง๊ณ ์ฃ์กํฉ๋๋ค. Kivy๋ ์ ๋ง ์ ๋งํด ๋ณด์์ง๋ง ์ค์น๋ฅผ ํด๋ณด๋ ๊ท์ฐฎ์ ์ผ์ด ๋์์ต๋๋ค. ์ด์จ๋ ๊ธฐํ๋ฅผ ์ค ๊ฒ์ด๊ณ ๋ง์์ ๋ค๋ฉด ํ๋ก์ ํธ์ ์ฐธ์ฌํ๋ ๊ฒ์ ํ์คํ ๊ณ ๋ คํ ๊ฒ์ ๋๋ค.
์๋
ํ์ธ์, Python 3.8์ด ์ค์น๋ ์ปจํ
์ด๋์ Kivy๋ฅผ ์ค์นํ ์ ์์ต๋๋ค.
๋ด๊ฐ ๋ฐ๊ฒฌํ ์ฐจ์ด์ ์ --pre
ํ๋๊ทธ๋ฅผ ์ฌ์ฉํ๋ค๋ ๊ฒ์
๋๋ค. ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ํธ๋ฆญ์ํ๋ค. ํ๋๊ทธ ์์ด๋ ์ค์นํ ์ ์์ต๋๋ค.
๋์๋ง ํ์ด์ง๋ ํ๋๊ทธ์ ๋ํด ๋ค์๊ณผ ๊ฐ์ด ๋งํฉ๋๋ค.
--pre Include pre-release and development versions. By default, pip only finds stable versions.
์์ 4์ ๋๊ธ์๋ ์ด๋ฏธ pre
ํ๋๊ทธ๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ด ๋์ ์์ต๋๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๋ฌํ ์ง์นจ์ ๋ช ๋ฌ ์ ์ ์ฌ์ ๋ฒ์ ์ pypi์ ์
๋ก๋ํ๊ธฐ ์ ์๋ ์๋ํ์ ๊ฒ์
๋๋ค. ์๋ํ๋ฉด pip๋ฅผ ์ฌ์ฉํ์ฌ ์๋ฒ์์ ๋ค์ด๋ก๋ํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ฃผ๊ธฐ ๋๋ฌธ์
๋๋ค.
์ ์ฌ์ ์ธ ์ ๊ท ์ฌ์ฉ์(์ ํฌํจ)๋ฅผ ๊ฒ์ฃผ๋ ๊ฒ์ ๋ํ ์ ์ ์ฐ๋ ค๋ ๋ณํ์ง ์์ต๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋ฌธ์์ ์ค์น ์น์
์ --pre
ํ๋๊ทธ๋ฅผ ํฌํจํ๊ณ ์๋ ๊ฒ๋ณด๋ค ๋ ์ข๊ฒ ๋ง๋๋ ๊ฒ์ ์ฌ์ ํ โโPython 3.8์ ๋ํด ์๋ํ๋ ์์ ์ ์ธ ๋ฆด๋ฆฌ์ค๊ฐ ์์์ ๊ฐ์กฐํ๊ธฐ ๋๋ฌธ์ ์๋ฒฝํ ์๋ฃจ์
์ด ์๋๋๋ค.
๋ด ์๊ฒฌ์ @codinghedgehog-python์ ๋ํ ๊ฒ์ด์์ต๋๋ค. ์ฌ๋ฌ ์ฌ๋๋ค์ด ์ด ๋ฌธ์ ๋ฅผ ๋ณธ ํ ์๋ํ์ง ์๋๋ค๊ณ ์ฌ๊ธฐ์ ๊ธฐ์ ๋๊ธ์ ๋ฌ์๊ธฐ ๋๋ฌธ์ ๋๋ค.
์ค์ ๋ก kivy==2.0.0rc3 ์ Python 3.8 ์ ์ค์น๋ฉ๋๋ค. ์ค์ ๋ก ์ด๊ฒ์ด Android(Python 3.8 ์ฌ์ฉ)์์ ์ฌ์ฉํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ฌ์ค์์ ๋ฆด๋ฆฌ์ค ๋ฒ์ ์ ๋๋ค.
Kivy 1.11.1 ์ค์น ๋ฌธ์์์ ๋๋ฝ๋ ๊ฒ์ (ํฐ ์น์ํ ๊ธ์๋ก) "Python 3.7 ONLY"์ ๋๋ค.
๋ฌธ์์ ์ฃผ์ ์ด๋ ค์์ ์์ ์ ์ธ ๋ฌธ์๋ฅผ ์ฝ๊ฒ ์ ๋ฐ์ดํธํ ์ ์๋ค๋ ๊ฒ์ ๋๋ค(CI์์ ๋ ์ด์ ๋น๋ํ์ง ์์). ๋ฐ๋ผ์ ์ฐ๋ฆฌ๊ฐ ํด์๋ ์ ๋๋ ๋ง์คํฐ ๋ฌธ์์ ๋ํ ๋งํฌ๋ก ์ฒซ ํ์ด์ง๋ฅผ ๋ณ๊ฒฝํ์ง ์๋ ํ ์ด ์ ๋ณด๋ฅผ ์๋ก์ด ์ฌ์ฉ์๊ฐ ๋ณด๋ (์์ ๋) ๋ฌธ์์ ์ถ๊ฐํ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค.
์๋ง๋ ๋ฏธ๋์ ์์ ์ ์ธ ๋ฌธ์๋ฅผ ๋ฆด๋ฆฌ์คํ๊ณ ์ ๋ฐ์ดํธํ ๋ ๋ฌธ์์ ๋ฐํด๊ฐ ์ง์๋๋ ์ต๋ ํ์ด์ฌ ๋ฒ์ ์ ํ์ํด์ผ ํ ๊ฒ์ ๋๋ค.
์์ง๋ง Kivy๋ ๋ฒ๋ ค์ง ๊ฒ์ฒ๋ผ ๋ณด์ด๊ธฐ ์์ํ์ต๋๋ค. ์ค๋์ Python 3.9์ ์ค์นํ๋ ค๋ ์ฌ๋์ด ์์ต๋๋ค.
์๋ง๋ 2.0.0์ ๋ฆด๋ฆฌ์คํ๊ณ ๋ฆด๋ฆฌ์ค ์ ์๋ฒฝํ์ง ์์ ๊ฒ์ด๋ผ๋ ์ ์ ๋ฐ์๋ค์ผ ๊ฒ์ ๋๋ค.
kivy๊ฐ 3-4๋ ์ ๋ณด๋ค ์ฝ์ด ๊ฐ๋ฐ์์ ํ๋์ด ์ ์ ๊ฒ์ ์ฌ์ค์ด์ง๋ง, ์ฌ๋๋ค์ด ์ด๋ค ์ด์ ๋ก ๋๋๋๋ ์คํ ์์ค์ ํน์ฑ์ด๋ฉฐ ํ์ฌ ์ฐ๋ฆฌ๋ ์ฝ๊ฐ์ ์ ์ ์ ์์ต๋๋ค.
๊ทธ๋ฆฌ๊ณ ๊ทธ ์น์ฌ์ดํธ, ๊ตฌ์ฒด์ ์ผ๋ก kivy๋ 5๋ ์ ๋ ๋์ ๋๋์ ์ธ ์น์ฌ์ดํธ ์ ๊ทธ๋ ์ด๋๊ฐ ํ์ํ์ง๋ง ์ง๊ธ๊น์ง ์๋ฌด๋ ๊ทธ๊ฒ์ ์ง์ผ๋ณธ ์ฌ๋์ด ์์์ต๋๋ค. ์ฌ์ํ ์ฌ์ ์ด ์๋๊ฐ ์ถ์ต๋๋ค.
๊ณํ์ https://github.com/kivy/kivy/pull/7132 ์์ ๋น๋ํ ์ ์๋ ํ ์ ์ป์ ์ ์๋ ์ฆ์ 2.0.0์ ๋ฆด๋ฆฌ์คํ๋ ๊ฒ์ ๋๋ค. ๋๊ตฐ๊ฐ ๋ฆด๋ฆฌ์ค ๋ ธํธ ๋ฑ์ ํตํด ์์ ํฉ๋๋ค. ์ผ๋ฐ์ ์ผ๋ก 1๋ ์ ํ ๋ฒ ๋ฆด๋ฆฌ์คํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋ง์ง๋ง ๋ฆด๋ฆฌ์ค ์ดํ ์ฝ 1๋ ์ด ์ง๋ฌ์ต๋๋ค. python์ ๋ฆด๋ฆฌ์ค ์ฃผ๊ธฐ๋ฅผ 1๋ ์ ํ ๋ฒ์ผ๋ก ๋๋ ธ์ผ๋ฏ๋ก 3.9๊ฐ ๋ฆด๋ฆฌ์ค๋ ๊ฒ์ฒ๋ผ 3.8์ ๋ํ ํ ์ด ์์ต๋๋ค.
@janek37 python(๋ฐ javascript) ๊ฐ๋ฐ์๋ ์ต์ ์ข ์์ฑ์ ์ฆ์ ์ง์ํ์ง ์๋ ๊ฒฝ์ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํ๊ธฐ, ๊ตฌ์์ผ๋ก ์ ์ธํ๋ ๊ฒฝํฅ์ด ์์ต๋๋ค. ๊ฐ์ธ์ ์ผ๋ก ๋๋ API ์์ ์ฑ์ ์ ํธํ๊ณ ์ต์ ์ข ์์ฑ ๋ฒ์ ์ ์คํํ๋ ๊ฒ๋ณด๋ค ํ๊ท๋ฅผ ํผํฉ๋๋ค. Kivy๋ ์ํํธ์จ์ด์ ๋ณต์กํ ๋ถ๋ถ์ด๋ฉฐ ์์ ์ฑ ๋ถ์ผ์์ kivy ๊ฐ๋ฐ์๋ ์ค๋ซ๋์ ์์ฃผ ์ข์ ์ผ์ ํด์์ต๋๋ค.
Kivy ํต์ฌ ๊ฐ๋ฐ์๊ฐ Canonical, Facebook ๋๋ Microsoft์ ๊ฐ์ ์๊ธ์ ๊ฐ์ง๊ณ ์์ง ์๋ค๋ ์ฌ์ค์ ๊ณ ๋ คํ๋ฉด ๊ทธ๋ค์ ๊ฝค ์ํ๊ณ ์์ต๋๋ค. ๋ํ ํ์๋ค๋ก๋ถํฐ Discord ๋ฐ Stack Overflow์ ๋ํ ์๋นํ ์ง์์ ๋ฐ๊ณ ์์ต๋๋ค.
๊ทธ๋ฆฌ๊ณ ์ด๊ฒ ์ ๊ฒ์ด ๋๋๋ก ์ฆ์ ์๋ํ์ง ์๊ณ ์ถ๊ฐ ์กฐ์ ์ด ํ์ํ ๊ฒฝ์ฐ ์คํ ์์ค์ด๊ณ ์ธ๋ ฅ์ด ๋น์๋๋ค. ๊ทธ๋ผ์๋ ๋ถ๊ตฌํ๊ณ Kivy๋ ์ฌ์ ํ ๊ฐ์ฅ ์ฑ์ํ GUI ํ๋ ์์ํฌ๋ก ๊ฐ์ฃผ๋๋ฏ๋ก ์ด์ ๋ํ ์ฐฌ์ฌ๋ฅผ ๋ณด๋
๋๋ค.
์๋ง๋ ๋๋ ๋ช ํํ์ง ์์์ง๋ง Kivy์ ๊ทธ ๊ฐ๋ฐ์๋ค์ ํ๋ฅญํฉ๋๋ค.
๊ทธ๋ฌ๋ ๋ฉ์ฒญํ ๋์ ๊ทธ๊ฒ์ ์ดํดํ์ง ๋ชปํ๊ณ ์ค์น๊ฐ ์๋ํ์ง ์๋๋ค๋ ๊ฒ์ ๊ฒฝํํฉ๋๋ค. ๋ณด๋ค ์๋ จ๋ ์ฌ์ฉ์๋ ํ์ฌ ๋ฒ์ ์ Python์ ์ํ ์ ํธ๋ก ์ง์ํ์ง ์๋ ๊ฒ์ผ๋ก ๋ด ๋๋ค.
๋ด๊ฐ ์ดํดํ๋ ๋ฐ์ ๋ฐ๋ฅด๋ฉด Python 3.9๋ Python์ ์์ง์ด๋ ๋์์ผ๋ก ๋ค๋ฃจ๊ธฐ ์์ํ์ง๋ง ์ด๊ฒ์ด ํด๊ฒฐ๋ ๋๊น์ง ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๋ ๋น๋ฒํ ์ ์ง ๊ด๋ฆฌ ๋ฆด๋ฆฌ์ค(๋ฌธ์ ๋ณ๊ฒฝ์ด ํ์ํ์ง ์์ ๋ฆด๋ฆฌ์ค)๊ฐ ๋์์ด ๋ ๊น์?
์ ์ง ๊ด๋ฆฌ ๋ฆด๋ฆฌ์ค๋ ์ด์ 2.0.0 ๋ค์์ ์ค๋จ๋ฉ๋๋ค. ๊ฐ๊น์ด ์ฅ๋์ Python 3.9๋ฅผ ์ง์ํ๋ 2.0.1์ ์๋ฏธํ๋๋ผ๋ ๋ฆด๋ฆฌ์คํด์ผ ํฉ๋๋ค.
์ฐ๋ฆฌ๋ ๋ค๋ฅธ os์ ๋ํ ๋ฐํด๋ฅผ ์ถ๊ฐํ์ฌ ์ค์น ํ๋ก์ธ์ค๋ฅผ ์ง์์ ์ผ๋ก ๊ฐ์ ํ๊ณ ์์ต๋๋ค. kivy deps๋ฅผ ๋ ๊ฐ๋จํ๊ฒ ๋ง๋๋ ๋ฑ ๋ค์ ๋ฆด๋ฆฌ์ค์์๋ ๊ถ์ฅ ์ค์น๊ฐ ๋น๋ก pip install kivy
๋ก ๋ฒ ์ด ์ค์น๋ก ์๋ํ ๊ฒ์
๋๋ค. pip install kivy[base]
๋๋ pip install kivy[full]
. ๋ฐ๋ผ์ ์ ๋ฆด๋ฆฌ์ค๋ก ์ค์น๋ฅผ ์
๋ฐ์ดํธํด์ผ ํ๋ ์ด์ ์
๋๋ค. ๊ทธ๋ฌ๋ ๋ชจ๋ ์ฃผ์ ์ด์ ์ฒด์ ์ ๋ํ ๋ฐํด๊ฐ ์๊ณ ์์ ๋ณ๊ฒฝ ์ฌํญ์ผ๋ก ์ธํด ์ด์ ์์ ํ๋ ๊ฒ์
๋๋ค.
3.9๋ฅผ ๊ธฐ๋ค๋ฆฌ์ง ์๊ณ ์ง๊ธ ์ถ์ํ๋ ๊ฒ๊ณผ ๊ด๋ จํ์ฌ, ๊ทธ๊ฒ์ด ๋ฐ๋ก ์ง๊ธ ๋ง๊ณ ์๋ ๊ฒ์ด ์๋๋๋ค. ๋ฆด๋ฆฌ์คํ๊ธฐ ์ ์ ๋ช ๊ฐ์ง ๋ฌธ์ ๋ฅผ ํด๊ฒฐํด์ผ ํ๋ฉฐ ๋ฆด๋ฆฌ์ค ๋ ธํธ ์ปดํ์ผ, conda, apt ๋ฑ๊ณผ ๊ฐ์ ๋ชจ๋ OS์์ ํ ์คํธํ๋ ๋ฐ ๊ฑธ๋ฆฌ๋ ์๊ฐ์ ์ค๋น๊ฐ ๋๋ฉด 3.9 ํ ๋ ์ค๋น๋์ด์ผ ํจ์ ์๋ฏธํฉ๋๋ค.
pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
์ด๊ฒ์ ๋ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ถํํ๋ ์์ ์ ์ธ ๋ฆด๋ฆฌ์ค๋ฅผ ์ํ python 3.8์ฉ ํ ์ด ์์ต๋๋ค. ์๋ํ์ง๋ง ๋ ์ด์ ์์ฑํ ํญ๋ชฉ์ด ์์ต๋๋ค.
๊ทธ๋ฌ๋ ๋ง์คํฐ๋ฅผ ์ฌ์ฉํ๋ ค๋ ๊ฒฝ์ฐ 3.8์ ์ฌ์ฉํ ์ ์๋ ์๋ฒฝํ๊ฒ ์ข์ ํ ์ด ์์ผ๋ฉฐ ์ค์ ๋ก ์ค์น๊ฐ ์๋นํ ๋จ์ํ๋์์ต๋๋ค. ์ค์ํ ๊ฒ์ 2๋จ๊ณ ์์
pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
๋ฅผ ์ฌ์ฉํ์ฌ pypi์์ ์ฌ์ฉํ ์ ์๊ธฐ ๋๋ฌธ์ ์๋ฒ์์ kivy๋ฅผ ๊ฐ์ ธ์ค๋ ๊ฒ์ ๋๋ค.pypi์ ์ถ๊ฐํ๋ ค๋ฉด ์ ๋ฆด๋ฆฌ์ค๋ฅผ ๋ง๋ค์ด์ผ ํ์ง๋ง ์ง๊ธ์ ์นด๋์ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.