LoginSignup
4
3

More than 3 years have passed since last update.

Atom 1.39.1 にアプデしたら platformio-ide-terminalが動かなくなった話

Last updated at Posted at 2019-07-26

追記

修正されました!!!よかったね!!!!
アプデしたらなおります
https://github.com/platformio/platformio-atom-ide-terminal/issues/707

以下の記事は古い情報ですが、思い出に残しておきます。

タイトルどおりです。師匠から「Atomなんて使うな」と言われているので、それを破った報いかもしれません。

環境

  • macOS Mojave 10.14.6
  • Atom 1.39.1 x64

症状

直してしまったら再現できなくなってしまいました。とりあえずアンインスコしてみたところ、またインスコできなくなってしまいました。

これはエラーの一部

解決まで

流れを適当に。私はひよっ子なのでこれでいいのかわからないのでアドバイスも欲しい、というところです。

バグったらIssue見に行けって師匠が言ってた

まずはissueの確認(https://github.com/platformio/platformio-atom-ide-terminal/issues/707#issuecomment-515280671)
普通にみんな困ってるみたいですね。よかった。私だけのバグだったらわからなくて詰んでた。
ざっと目を通してみるとMac向けアドバイス発見

2 more temps fixes:
- downgrade to Atom 1.38.2 and disable automatic upgrade in preferences. You still might need to rebuild the package after the downgrade.
- Keep Atom 1.39.0 and set global python version to 2.7.16 (I testest with this version) and rebuild/reinstall platformio-ide-terminal. Then you could reset your python version to your preferred one. The terminal package should still work in Atom. The pyenv tool is the best to manage python versions IMO.
I'm on Mac, but I don't see why this shouldn't work on other platforms.

Atomを1.38.2に落とすかpythonのversionを2.7.16にすればいいって書いてますね。今回はpythonのバージョンを変更する方向にしましょう。筆者がpythonをほとんど使ってないためなんの痛手にもならないからです。

Pyenvでバージョン変更

Pyenvの入れ方はこの記事を参考にすると良いと思います。以下は私がひっかかったところだけ書き留めます。

MojaveでPyenvがすんなりいかない話

2.7.16 (3未満の最新版)をインストールしてみる。

terminal
pyenv install 2.7.16  
実行結果
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-2.7.16.tar.xz...
-> https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tar.xz
Installing Python-2.7.16...
python-build: use readline from homebrew
ERROR: The Python zlib extension was not compiled. Missing the zlib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (OS X 10.14.6 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/gv/68wbn48s0d54vzzk7flzx9k40000gn/T/python-build.20190726183326.97621
Results logged to /var/folders/gv/68wbn48s0d54vzzk7flzx9k40000gn/T/python-build.20190726183326.97621.log

Last 10 log lines:
rm -f /Users/xxx/.pyenv/versions/2.7.16/share/man/man1/python.1
(cd /Users/xxx/.pyenv/versions/2.7.16/share/man/man1; ln -s python2.1 python.1)
if test "xno" != "xno"  ; then \
        case no in \
            upgrade) ensurepip="--upgrade" ;; \
            install|*) ensurepip="" ;; \
        esac; \
         ./python.exe -E -m ensurepip \
            $ensurepip --root=/ ; \
    fi

あれ? BUILD FAILEDって出てる。ログ見てもよくわからないのでエラーメッセージでググる。
この記事がヒット。ただ、readlineとxzはインストール済なので少し異なる模様。おとなしくエラーメッセージ内のリンク(https://github.com/pyenv/pyenv/wiki/Common-build-problems) に飛ぶ。すると一番最初のところに

When running Mojave or higher (10.14+) you will also need to install the additional SDK headers by downloading them from Apple Developers. You can also check under /Library/Developer/CommandLineTools/Packages/ as some versions of Mac OS will have the pkg locally.

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

う〜〜んこれだなぁ。実行する。

terminal
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
   installer: Package name is macOS_SDK_headers_for_macOS_10.14
   installer: Installing at base path /
   installer: The install was successful.

いったっぽい。

terminal
pyenv install 2.7.16                                                                                                                                         
    python-build: use openssl from homebrew
    python-build: use readline from homebrew
    Downloading Python-2.7.16.tar.xz...
    -> https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tar.xz
    Installing Python-2.7.16...
    python-build: use readline from homebrew
    Installed Python-2.7.16 to /Users/xxx/.pyenv/versions/2.7.16

これでOK。バージョン変更へ

terminal
pyenv global 2.7.16
python --version
   Python 2.7.16

あとは流れで

platformio-ide-terminalをパッケージからインストール

いけましたね。

以上。その他諸々

一度platformio-ide-terminalパッケージのインストールに成功すれば、どうやらpythonのバージョンを元に戻しても大丈夫みたいです。なんでだろう?
初めての記事+ひよっ子プログラマーなので、解決手順とか間違っていたりすればコメントで教えて頂ければ幸いです。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3