0
1

More than 1 year has passed since last update.

【Python】Pythonライブラリの保存先の参照方法

Last updated at Posted at 2022-08-29

背景

  • pipでinstallしても、ModuleNotFoundError:となることがある。
  • Pythonのライブラリの保存先を参照し、正しい場所にライブラリをinstallしたい。

目標

(1)Pythonのimportの参照先のpathを特定できるようになる。
(2)pipで好きなpath(場所)にライブラリを保存できるようになる。

importの参照先と指定場所への保存方法

  1. Pythonのimportの参照先のpathを特定できるようになる。
    ・sys.pathを使用する。

  2. pipで好きなpath(場所)にライブラリを保存できるようになる。
    ・pip -t の後に保存したい場所のpathを記載する。

ライブラリの保存先.png

補足

  • importの参照先の追加方法もそのうち追記したい。

参考資料

個人ブログ

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