LoginSignup
7
10

More than 3 years have passed since last update.

【iOS】Pythonista3 でもpipコマンドでモジュールをインストールできる。

Last updated at Posted at 2020-11-09

はじめに

iOS/iPadOS用のアプリ‎Pythonista 3には様々なモジュールがインストールされていますが、外部モジュールをpipコマンドでインストールすることもできます。

必要なもの

  • StaSh

StaShのインストール

こちらの記事にメモしておいたのですが、StaShをインストールするだけです。
Pythonista 3 にStaSh をインストールする。 - Qiita

コンソールに次の呪文をコピペして実行します。

StaShをインストールする呪文
import requests as r; exec(r.get('http://bit.ly/get-stash').text)

インストールが完了すると次のメッセージが表示されるので再起動します。

Please Restart Pythonista and run launch_stash.py under the Home directory to start StaSh.

pipコマンドでインストール

ためしにpipコマンドで googletrans をインストールする手順を説明します。

  1. StaShを起動
  2. pipコマンド

StaShを起動

launch_stash.pyを実行します。

pipコマンド

StaShが起動したらコマンドpip install googletransを入力して実行します。

インストールできないモジュール

PythonではおなじみのモジュールでもPythonistaにはインストールできないモジュールがあります。

  • OpenCV
7
10
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
7
10