#author("2021-06-26T12:36:33+00:00","default:hotate","hotate") #author("2021-06-27T05:16:21+00:00","default:hotate","hotate") #contents &tag(Python,Windows); * [[Windows]] [#c20584af] ** インストール [#aaec694c] - [[WinPython のインストール(Windows 上)>https://www.kkaneko.jp/tools/win/winpython.html]] (2021/06/22) WinPython は,Window 用のPython 処理系と主要な Python パッケージを1つにまとめたソフトウエア.次のアプリケーションも同封されている ** [[コマンド]] [#o375d640] - [[「Pythonが動かない...」の簡単な解決方法(Windows) | ガンマソフト株式会社>https://gammasoft.jp/blog/resolve-not-to-run-python/]] このpyコマンドを実行すると、Pythonランチャーと呼ばれるユーティリティがPythonを起動してくれます。つまり、Pathが通っていなくても、このランチャーがインストールした場所にあるPythonを起動してくれます。 ** VisualStudioCode [#bbcac44b] - [[Visual Studio Codeの設定「虎の巻」:Python編:特集:Visual Studio Codeを使いこなそう!(1/3 ページ) - @IT>https://www.atmarkit.co.jp/ait/articles/1711/24/news034.html]] (2018/04/24) 今回はVS CodeでPythonプログラミングを行う上で必須となるPython拡張機能と、その使い方と設定項目などについて取り上げる。 ** [[Jenkins]] [#d3649b05] *** [[utf-8]] [#bedffb1a] - [[Windows 上の Python で UTF-8 をデフォルトにする - Qiita>https://qiita.com/methane/items/9a19ddf615089b071e71]] TL;DR: UTF-8をデフォルトで使いたい人は環境変数に PYTHONUTF8=1 を設定しよう -- コメント:上記の設定にて、[[Jenkins]]コンソール文字化けが直った。(2021/06/10) ** ライブラリ [#y170d18b] *** [[PyCairo>https://pycairo.readthedocs.io/en/latest/]] [#z581e62e] - [[python - Installation of PyCairo on Windows - Stack Overflow>https://stackoverflow.com/questions/48131876/installation-of-pycairo-on-windows]] You are trying to install pycairo from source on Windows, which requires a Windows C compiler. You can try the Unofficial Windows Binaries for Python Extension Packages web site. pip install https://download.lfd.uci.edu/pythonlibs/gjr6o2id/pycairo-1.15.4-cp36-cp36m-win_amd64.whl -- コメント:C++コンパイラは不要。[[Python3]].9 へPyCairoのインストールに成功した。(2021/05/28) --- [[Python Extension Packages for Windows - Christoph Gohlke>https://www.lfd.uci.edu/~gohlke/pythonlibs/]] -- コメント:サンプルを実行させてみたが、生成された[[svg]]ファイルは不完全だった。(赤色の線が描画されない)(2021/05/28) --- [[Overview — Pycairo documentation>https://pycairo.readthedocs.io/en/latest/]] *** [[CairoSVG>https://cairosvg.org/documentation/#installation]] [#h0a9ebdf] - 上記の方法でPyCairoをインストール後、インストール出来ることを確認した。(コンパイルは不要)(2021/05/28) >pip install cairosvg - しかし、実際に呼び出してみるとエラーが発生した。別途DLLの追加が必要らしい。(未検証)(2021/05/28) OSError: no library called "cairo" was found no library called "libcairo-2" was found -- [[windows - Python: OSError: cannot load library libcairo.so.2 - Stack Overflow>https://stackoverflow.com/questions/28211418/python-oserror-cannot-load-library-libcairo-so-2]] -- [[Installing — WeasyPrint 52.4 documentation>https://weasyprint.readthedocs.io/en/stable/install.html]] * 関連 [#j6ec3ac8] #related