【問題】
pipenvで
pipenv install jupyter numpy
のようにしてjupyter notebookを立ち上げたところ、
numpyImportError: No module named 'numpy'
のようなエラーが出てしまう
なおterminalから直接.pyを起動させるとnumpyのimportはうまくいくのに、jupyterからだとimport出来ないので、明らかにjupyterの問題だと判別できる
【解決策】
pipenv install "tornado<6" numpy jupyter
以上のように、 "tornado<6"
というのを一緒にダウンロードすると問題なくnumpyなどがimportできる
いつも使ってるコマンドを自分用にメモしておく↓
pipenv install numpy scipy pandas scikit-learn matplotlib jupyter "tornado<6"
最低限のツールは入っているのでここにどんどん必要なものを足していってほしい。
【補足:tornadoって何?】
tornadoはpythonのwebフレームワークのようで、jupyterとも関わりがあるらしい
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.
Tornado Web Server — Tornado 6.0.3 documentation