Help us understand the problem. What is going on with this article?

mac pyenvでPython 3.7.xをインストールしたらSQLite3がないと怒られたときのTips

More than 1 year has passed since last update.

自分の環境

* macOS mojave 10.14.2
* pyenv 1.2.9
* python 3.7.2

発生した現象

WARNING: IPython History requires SQLite, your history will not be saved

macのpyenvでPython 3.7.2をインストール。
pipでipythonをインストール。
ipythonを起動したら、sqlite3がないと履歴を保存できない的なエラーが発生。
履歴機能が効かないのは困る。

解決方法

実は公式レポジトリに挙がっている。よくある問題みたい

1. Apple DeveloperからCommand Line ToolsをDL & インストール

DL元はここ。Appleのアカウントが必要。
https://developer.apple.com/download/more/?q=Command%20Line%20Tools

2. 1で取得したheadersをインストールし、pythonを再インストール

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

pyenv uninstall 3.7.x
pyenv install 3.7.x
pyenv global 3.7.x
pyenv rehash

ipython // ここでエラーがなくなるはず
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした