1
0

More than 1 year has passed since last update.

【Python、pip】WARNING: The script dotenv is installed in '/home/xxx/.local/bin' which is not on PATH.

Last updated at Posted at 2023-04-01

概要

ayato@ayato-app-dev:~/BeginnersSec/bot$ pip install python-dotenv
Defaulting to user installation because normal site-packages is not writeable
Collecting python-dotenv
  Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Installing collected packages: python-dotenv
  WARNING: The script dotenv is installed in '/home/ayato/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed python-dotenv-1.0.0

こんな感じのエラーが出ることがある。

対処法

PATHに/home/ayato/.local/binが追加されていないことが原因になっている

以下コマンドで解決できる。

echo 'export PATH="/home/ayato/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

/home/ayato/.local/binのところは警告で出ているWARNING: ... '/home/ayato/.local/bin' ... is not on PATH.のところに書き換える。
Bashを使っている人は~/.bashrcで大丈夫だが、Zshとかを使っている人は適宜置き換えて下さい。

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