なんだこれは

はてなダイアリーから移転しました。

translation in Japanese

gitlab translation in Japanese

gitlab の翻訳プロジェクトに参加しているのですけれども、新しい文章が追加されましたというメールがよく届く。届く->メールのリンク->翻訳ページ とアクセスが早いのも理由かもしれない。

ただ、翻訳を進めてもこの翻訳を承認する作業が進んでいないようで、最新のgitlabを使用しても全体の50%ぐらいしか翻訳が進んでいないようになってしまっている。早く承認して欲しいものだ。

qt5-qtcreator build failed

qt5-qtcreator build failed

qt5-qtcreator のビルドに失敗した。これは macports で提供されているものである。 報告しなきゃなーと思って macports のサイトを眺めてみるとソックリの指摘があがっていたので、確認。

 #58418 qt5-qtcreator fails to build on Mojave with Xcode-10.2.1 
https://trac.macports.org/ticket/58418 

添付されたログを見るとすこし違うようだったので、そのまま登録することにした。

Pycharm work well again

pycharm work well again

https://fu7mu4.hatenablog.com/entry/2019/04/27/111014 の続き

JetBrains社から回答がきてそれに従ってインストールし直して解決した。

  1. 古い PyCharmCE.app を削除
  2. PyCharmCE.app が使用していたディレクトリを全部削除 https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html
  3. PyCharmCE をダウンロードして再インストール

Enjoy Solitude

Enjoy Solitude

jupyter notebook を pip でインストールする

TL;DR

jupyter の依存関係で 必要な tornado のインストールに失敗した。 tornado のインストール前にsetuptools いれておく。

python3 -m pip install --user upgrade
python3 -m pip install --user setuptools
python3 -m pip install --user jupyter

経緯

  • Pycham が起動しなくなってしまったので、
  • とりあえずの退避先として jupyter notebook を選択

jupyterのインストール

https://jupyter.org/install.html によると、とある。

python3 -m pip install --upgrade pip
python3 -m pip install jupyter

ローカルへインストール

ここではローカルにインストールするため --user を追加することにした。 以下を実行する。

python3 -m pip install --user --upgrade pip
python3 -m pip install --user jupyter

結果 setuptools がないのでインストールできませんと言われてしまう。

Collecting tornado>=4.2 (from ipykernel->jupyter)
  Using cached https://files.pythonhosted.org/packages/03/3f/5f89d99fca3c0100c8cede4f53f660b126d39e0d6a1e943e95cc3ed386fb/tornado-6.0.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/bp/_4wncwxj0z97ln0s0syx7lsr0000gn/T/pip-install-2lb8ioy9/tornado/

ひきつづき、setuptools をインストールして再度続きを行うとインストールできた。

python3 -m pip install --user setuptools
python3 -m pip install --user jupyter

ローカルインストール時の注意

ローカルにインストールした場合、スクリプトがパスにないためそのままでは実行できないことが警告される。

  WARNING: The script pygmentize is installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The scripts jupyter-kernel, jupyter-kernelspec and jupyter-run are installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The scripts iptest, iptest3, ipython and ipython3 are installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The script jsonschema is installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The script jupyter-trust is installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The script jupyter-nbconvert is installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The scripts jupyter-bundlerextension, jupyter-nbextension, jupyter-notebook and jupyter-serverextension are installed in '/Users/fu7mu4/Library/Python/3.5/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.
  WARNING: The script jupyter-console is installed in '/Users/fu7mu4/Library/Python/3.5/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.

.bashrc や .bash_profile などで PATH に追加する必要がある。

pycharm is suddenly dead

why pycharm is suddenly dead ?

理由はわからないが pycharm が起動しなくなったのでいろいろ試してみた記録

操作

/Application/PyCharm CE.app をダブルクリック

期待した動作

PyCharm CE の起動

実際の動作

メニューに PyCharmと表われるもののすぐに消えてしまう。

ログ

コンソール.app のログ

Process:               python [27743]
Path:                  /Users/USER/*/python
Identifier:            python
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        pycharm [27480]
Responsible:           python [27743]
User ID:               501

Date/Time:             2019-04-27 00:54:07.346 +0900
OS Version:            Mac OS X 10.14.4 (18E226)
Report Version:        12
Anonymous UUID:        E2143080-716A-5603-C197-A0C5A7F6E360

Sleep/Wake UUID:       EF4C14FA-5C00-4EC9-98BF-CB5A3563F682

Time Awake Since Boot: 1800000 seconds
Time Since Wake:       6800 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/Python
  Referenced from: /Users/USER/*/python
  Reason: image not found

Binary Images:
       0x10f76d000 -        0x10f76efff +python (0) <A5742A7B-580B-3837-A76B-6183B9F1FDE6> /Users/USER/*/python
       0x114528000 -        0x1145926ef  dyld (655.1.1) <F217F7F8-A795-3109-B77F-B1E2277F3E3B> /usr/lib/dyld


System Profile:
Network Service: Apple USB Ethernet Adapter, Ethernet, en3
Network Service: Wi-Fi, AirPort, en0
Boot Volume File System Type: apfs
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
USB Device: USB 3.0 Bus
USB Device: USB 2.0 Hub
USB Device: Elements 25A2
USB Device: Apple USB Ethernet Adapter
Thunderbolt Bus: MacBook Pro, Apple Inc., 39.2
Model: MacBookPro14,1, BootROM 190.0.0.0.0, 2 processors, Intel Core i5, 2.3 GHz, 8 GB, SMC 2.43f6
Graphics: kHW_IntelIrisGraphics640Item, Intel Iris Plus Graphics 640, spdisplays_builtin
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x170), Broadcom BCM43xx 1.0 (7.77.61.2 AirPortDriverBrcmNIC-1305.8)
Bluetooth: Version 6.0.11f4, 3 services, 18 devices, 1 incoming serial ports

抜粋 Dyld Message

Dyld Error Message:
  Library not loaded: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/Python
  Referenced from: /Users/USER/*/python
  Reason: image not found

/opt/local/Library/Frameworks/Python.framework/Versions/3.5 の下に Python フォルダがない。3.6 にはある。

とりあえず python3.5 をいれるとそのディレクトリが作成できた。

再度実行

メニューに PyCharmと表われるもののすぐに消えてしまう。

ターミナルからの起動

2019-04-27 10:18:35.145 pycharm[1234:40447] allVms required 1.8*,1.8+ 2019-04-27 10:18:35.148 pycharm[1234:40458] Value of PYCHARM_VM_OPTIONS is (null) 2019-04-27 10:18:35.148 pycharm[1234:40458] Processing VMOptions file at /Users/dote/Library/Preferences/PyCharmCE2019.1/pycharm.vmoptions 2019-04-27 10:18:35.148 pycharm[1234:40458] Done OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

Start Failed: Internal error. Please report to http://jb.gg/ide/critical-startup-errors

java.lang.NoSuchMethodError: com.intellij.openapi.util.text.StringUtil$1: method ()V not found at com.intellij.openapi.util.text.StringUtil.(StringUtil.java:104) at com.intellij.openapi.util.SystemInfo.(SystemInfo.java:45) at com.intellij.Patches.(Patches.java:14) at com.intellij.openapi.util.io.FileUtil.(FileUtil.java:40) at com.intellij.openapi.application.PathManager.getAbsolutePath(PathManager.java:557) at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:84) at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:72) at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:409) at com.intellij.ide.Bootstrap.main(Bootstrap.java:17) at com.intellij.idea.Main.main(Main.java:61)

java.lang.Error: no ComponentUI class for: javax.swing.JTextPane[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,caretColor=,disabledTextColor=,editable=true,margin=,selectedTextColor=,selectionColor=,kit=,typeHandlers=] at java.desktop/javax.swing.UIDefaults.getUIError(Unknown Source) at java.desktop/javax.swing.MultiUIDefaults.getUIError(Unknown Source) at java.desktop/javax.swing.UIDefaults.getUI(Unknown Source) at java.desktop/javax.swing.UIManager.getUI(Unknown Source) at java.desktop/javax.swing.text.JTextComponent.updateUI(JTextComponent.java:340) at java.desktop/javax.swing.text.JTextComponent.(JTextComponent.java:314) at java.desktop/javax.swing.JEditorPane.(JEditorPane.java:196) at java.desktop/javax.swing.JTextPane.(Unknown Source) at com.intellij.idea.Main.showMessage(Main.java:158) at com.intellij.idea.Main.showMessage(Main.java:134) at com.intellij.idea.Main.main(Main.java:64)

Also, an UI exception occurred on attempt to show above message: java.lang.NoSuchFieldError: AA_TEXT_PROPERTY_KEY at java.desktop/javax.swing.JComponent.setUI(JComponent.java:662) at java.desktop/javax.swing.text.JTextComponent.setUI(JTextComponent.java:330) at java.desktop/javax.swing.text.JTextComponent.updateUI(JTextComponent.java:340) at java.desktop/javax.swing.text.JTextComponent.(JTextComponent.java:314) at java.desktop/javax.swing.JEditorPane.(JEditorPane.java:196) at java.desktop/javax.swing.JTextPane.(Unknown Source) at com.intellij.idea.Main.showMessage(Main.java:158) at com.intellij.idea.Main.showMessage(Main.java:134) at com.intellij.idea.Main.main(Main.java:64)

あ、これは何かやらかしたらしい。

報告しろとあったので、http://jb.gg/ide/critical-startup-errors を開いて報告した。

openjdk 1.8 のインストーラーが欲しいとき

Windows 用の openjdk 1.8 のインストーラーが欲しいとき

通常のものは、古いJavaが必要になることはマレなんだけれど、たまに Java 1.8 でしか動作しないというのもある。 商用ツールでこれをやられることがある。やれやれ。

Windows 用の openjdk 1.8 のインストーラーが欲しいときはとりあえず、こちら。

https://github.com/ojdkbuild/ojdkbuild の [release]https://github.com/ojdkbuild/ojdkbuild/releases へ移動。 java-1.8.0-openjdk-1.8.0* の中から適当なのを選ぼう。

残念ながら macOS 向けの openjdk 1.8 バイナリはみつからないが、特に必要になったことはない。