how can I add this to PATH, after instalation pipenv? on Ubuntu 22.04.3 LTS Linux

117 views Asked by At

after instalation pipenv, this alarm arose:

WARNING: The scripts pipenv and pipenv-resolver are installed in '/home/sina/.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 pipenv-2023.11.15 setuptools-69.0.2

This is my way to fix it:

For bash: Open your ~/.bashrc file in a text editor.:

nano ~/.bashrc

At the end of the file:

export PATH="$PATH:/home/sina/.local/bin"

Save the file and exit.

restart your terminal or run the following command:

source ~/.bashrc

1

There are 1 answers

0
Laur Ivan On

Your setup suggests you installed pipenv via pip install pipenv --user.

As per documentation, you need indeed to modify one of the files loaded by the shell on startup. The documentation suggests updating ~/.profile, not ~/.bashrc.

Alternatively, if you can, you can install pipenv via your favourite package manager (as root); in that case, it'll be available in the PATH.