1
4

More than 3 years have passed since last update.

PythonAnywhereにてpip installしたい

Last updated at Posted at 2020-09-01

はじめに

私の記事では毎度お馴染みの自作競艇予想サイト、「きょう、ていの良い
予想はあたるだろうか。
」に自然言語処理的な機能を追加しました。
本記事では、PythonAnywhereにていざ実装!となった段階で起きたトラブルをまとめています。

Localでは動くが、PythonAnywhere上で動かない!!

Local環境での動作検証を終え、万を辞してPythonAnywhere上のファイルを差し替え、更新!!しかし、ここでエラーが起こりました..
errorlogを確認すると、どうやらjanomeがinstallされていないことが原因の様でした...

image.png

意外と簡単だったpip install

PythonAnywhere上の環境にも「pip install janome」的なことを実施すればいいので、その方法を探した所、あっけなく見つかりました。
以下、その手順となります。

①Consoleタブに移動し、Bash consoleをクリック
image.png

②開かれたら、pip install --user janomeと打ち込む
他のmoduleをinstallしたい場合も同様ですね。
(下図はすでにinstallした後のものです..)
image.png

③"pip list"と打ち込んで入力されていることを確認!
image.png

おわりに

無事、PythonAnywhere上でも動作できるようになりました!!めでたしめでたし。janomeをinstallして何をしたのかは、私の別記事を読んでいただければ幸いです..。

公式サイトにも解説が載っていましたので、こちらもご参考に。

1
4
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
1
4