ChromeBook 에서의 Python어디까지 될까?

ChromeBook에서 Linux환경을 지원하고 있습니다. apt도 되고, python패키지들도 무리없이 되는데요.
이번에 브라우저 런처를 만들다보니. 크롬북도 될까? 라는 의문이 들어서 직접 해보기로 했습니다.
pysimplegui의 설치는 무리없이 잘되었고요.
구글플레이스토어가 있는데, 여기서 아마 VisualStudioCode도 되니 PyCharm도 깔 수 있을 것 같긴한데. 이래저래 다 해보기로 합니다.

그냥 Jetbrain ToolBox하나면 AndroidStudio나 PyCharm 그냥 리눅스처럼 설치가 되네요 –;;
https://www.jetbrains.com/help/pycharm/installation-guide.html

우선 pysimplegui와 pyinstaller는 설치가 되지만, 일반적인 우분투의 환경에서처럼 편리하게 pyinstaller명령을 쓸수도 없고, python3로 스크립트를 실행시켜도 invalid syntax로 실행이 안되네요. 2,3나 위치는 다른데 invalid syntax로 걸립니다.
그리고 compile된 바이너리를 실행하면
GLIBC_2.25 의존성이 안 맞는다고 실행이 안되네요.
이부분은 뭔가 다른 어플리케이션에서도 유사한 에러가 나온것이 있어. container업데이트로 해결한게 있어서 따라해보고 있습니다. 보니까. Debian Strech에서 Buster로 apt source를 옮겨서 받아오는 모양이네요.
https://github.com/TablePlus/TablePlus-Linux/issues/24
https://gitlab.com/ppulfer-random-stuff/debian-buster-in-crostini/blob/master/upgrade_container.sh

이후 설치할게 좀 많네요..
sudo apt install python-pip, python3-pip, python-tk, python3-tk
pip3 install pysimplegui

까지 설치하고 나니. 스크립트로 실행이 됩니다.
이제 다시 pyinstaller로 해봐야겠네요.
pip3 pytinstaller
설치과정을 다시 자세히 보니 아무래도, PATH설정이 안된 것 때문인 것도 있던 모양입니다. PATH설정하면, pyinstaller로 바로 실행이 될 것 같네요.

Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/3c/c9/c3f9bc64eb11eee6a824686deba6129884c8cbdf70e750661773b9865ee0/PyInstaller-3.6.tar.gz
Installing build dependencies ... done
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from pyinstaller) (40.8.0)
Collecting altgraph (from pyinstaller)
Using cached https://files.pythonhosted.org/packages/ee/3d/bfca21174b162f6ce674953f1b7a640c1498357fa6184776029557c25399/altgraph-0.17-py2.py3-none-any.whl
Building wheels for collected packages: pyinstaller
Running setup.py bdist_wheel for pyinstaller ... done
Stored in directory: /home/jiwonuskim/.cache/pip/wheels/62/fe/62/4c0f196d1e0dd689e097449bc81d7d585a7de7dd86b081b80b
Successfully built pyinstaller
Installing collected packages: altgraph, pyinstaller
The scripts pyi-archive_viewer, pyi-bindepend, pyi-grab_version, pyi-makespec, pyi-set_version and pyinstaller are installed in '/home/jiwonuskim/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed altgraph-0.17 pyinstaller-3.6

이 상황에서, 전에 빌드해놓은 ELF바이너리도 정상으로 수행되고.
pyinstaller로 새로운 바이너리 빌드도 정상으로 되네요.
그리고 ChromeOS의 Linux공유 폴더 마운트된 곳은 Write권한이 없어서, 안되니 Home등으로 옮기고 작업을 해야하겠습니다.
근데, 용량이 조금 더 크네요. 환경에 잡혀있는 모든 모듈들을 다 넣는건지,, 용량이 제법됩니다. 최적화는 필요해보입니다.
브라우저야 어차피 크롬이라, 그냥 탭으로 잘 실행되네요.


게시됨

카테고리

,

작성자

태그: