When I install e.g. conan.io with pip like so
sudo pip install conan
after the installation passes (and installs the packages to /usr/local/lib/python2.7/dist-packages/
) I can easily trigger command from the installed package (here conan
) and my shell will find it but when I install it in user model like so:
pip install --user conan
it will install it to ~/.local/lib/python2.7/site-packages/
and my shell will not find it.
What am I doing wrong here or what am I missing?
Use Pip --user installs for your default environment Notice the line /home/vagrant/. local/lib/python2. 7/site-packages . This is the path containing packages that have been installed with the Pip --user option.
By default, the “pip install” command is used to install a package for all users. This means the package will be installed into the system directory like “/usr/local/lib/python3. 8” in Linux systems.
This error usually means there's a problem with the Python installation or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem. The easiest way is via the Python executable installer.
pip looks for packages in a number of places: on PyPI (if not disabled via --no-index ), in the local filesystem, and in any additional repositories specified via --find-links or --index-url .
Shell scripts are installed in ~/.local/bin
, you have to add the directory to your $PATH
:
export PATH=$HOME/.local/bin:$PATH; conan
should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With