LoginSignup
6
4

More than 3 years have passed since last update.

開発中のPythonモジュールをpip installする

Posted at

久しぶりにsetup.pyを書いてたら詰まったのでメモ

setup.py
from distutils.core import setup
setup(...)

はるか以前の記憶によれば、これをインストールするには

python3 setup.py develop --user

だったのだが、develop引数はdistutilsに以降すると共になくなったらしく、

pip3 install -e . --user

の用に-e付き(editable)でインストールするように言われた。なお--userはシステムでなく、ユーザー領域にインストールするためのオプション。これで現在のディレクトリにあるパッケージを別の場所に移さずにインストールすることが出来る。なのでこのファイルを変更すると即座に反映される。

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