投稿

12月, 2019の投稿を表示しています

Python 3.7.6 に brew upgrade したら python3 がターミナルで無効になった

Python 3.7.6 (default, Dec 27 2019, 09:51:07) に brew upgrade したら python3 がターミナルで無効になりました。 brew doctor によると Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: python texi2html numpy scipy pyqt らしいです。`brew link python` で再接続です。 % brew link python Linking /usr/local/Cellar/python/3.7.6... 24 symlinks created % python Python 2.7.17 (default, Dec 23 2019, 21:25:34) [GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> exit() % python3 Python 3.7.6 (default, Dec 27 2019, 09:51:07) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>

SudachiPy の辞書を SudachiDict_full で update と設定

sudachi の辞書の定期 update が行われました。 https://twitter.com/sorami/status/1210148792189640704 と、いうことで、SudachiPy の辞書も SudachiDict_full で update します。 GitHub の SudachiPy の README.md の Easy Setup のStep 2: Install SudachiDict_core の一部改変で、"core" を "full" に置換します。ターミナルから、 % pip3 install https://object-storage.tyo2.conoha.io/v1/nc_2520839e1f9641b08211a5c85243124a/sudachi/SudachiDict_full-20191224.tar.gz % sudachipy link -t full 上記の2行で出来ちゃうハズです。SudachiDict_full の方でも tar.gz で 125 Mb 弱なので、私的には、それほど大きな辞書ではない印象です。 GitHub の SudachiPy の README.md の Install dict packages は、`SudachiDict_full-20190718.tar.gz` と古いのになっているので注意です。`$ pip3 install SudachiDict_full-20191224.tar.gz` で行けるかは試していません。 お試し % python3 Python 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from sudachipy import tokenizer >>> from sudachipy imp...

macOS Mojave での PyPlot.jl の MPLBACKEND の設定

いつ頃からか、julia の PyPlot で、警告を認めるようになりました。"Warning: PyPlot is using tkagg backend, which is known to cause crashes on MacOS (#410); use the MPLBACKEND environment variable to request a different backend." とのこと。 StackOverflow に解決法 が載っています。 `qt5agg` の場合は、PyQt5 がインストールされているのが前提です。インストールされていない方は `pip3 install PyQt5` 等で先にインストールしてください。 .bashrc や .zshrc などに、`export MPLBACKEND=qt5agg` と書き込む ターミナルを再起動する julia を立ち上げる ]build PyCall PyPlot (i.e. pkg> build PyCall PyPlot) 以上で解決しました。なお、自分の環境では、pip3 list で、PyQt5 (5.13.2) でした。尚、julia から、Homebrew でインストールした /usr/local/bin/python3 を PyCall で読み込んでいます。

julia 1.3.0 の Plots と Makie

2019年12月16日に up して、`Plots v0.28.3` になってようやく、`plot(rand(10),rand(10))` が描画されるようになりました。12月9日は、`gr()` は動かず `pyplot()` は動くという状態でした。 Makie についても12月9日は動かずでした。Makie は、 1.2 と同様 に #master を使っています。 (v1.3) pkg> add AbstractPlotting#master Makie#master GLMakie#master 2019年12月16日の `test Makie` は、"Some tests did not pass: 198 passed, 12 failed, 0 errored, 0 broken." でした。1.3.0 も、もう少しで完全に通りそうです。 (v1.3) pkg> test Makie (中略) Test Summary: | Pass Fail Total Reference Image Tests | 198 12 210 3d_contour_with_2d_contour_slices | 1 1 3d_cube_with_sphere_cutout,_inside | 1 1 3d_cube_with_sphere_cutout,_outside | 1 1 add_and_change_points | 1 1 analysis | 5 5 (以下 Fali のみ) box_plot ...