0

anybody know why I have something like this? why they are with the same name but they have different locations? which one should i use ?

enter image description here

ps: I should say that I did add these two lines to .bashrc export PATH="${PATH}:/home/qr8v/.local/bin" export PYTHONPATH="${PYTHONPATH}:/home/qr8v/.local/bin" because I had a problem. it was saying that scripts were installed in a folder that is not on PATH. then I added these two lines to .bashrc

5
  • check your system variables. Maybe they are duplicated there. Commented May 17, 2020 at 10:45
  • What is the output of running this command echo $PATH in terminal?? Commented May 17, 2020 at 10:47
  • @Anwarvic this is the outcome of that /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/qr8v/.local/bin:/home/qr8v/.local/bin Commented May 17, 2020 at 10:51
  • @Wippo with printenv? I did that but I didn't get anything from it. Commented May 17, 2020 at 10:54
  • @daan could you open /bin on your machine and search for python. If found, then Python is installed in two places. If not found, maybe something wrong in .bashrc. Anyway, it's not a big deal. You can choose any one of them with no problem Commented May 17, 2020 at 11:05

1 Answer 1

1

I always stick to the /usr/bin/path, here is the link with some explanation between those two: bin vs usr/bin.

If you make some virtual envs, they will be listed here as well, and it is always good to use virtual environments for bigger projects. You can look that up here.

Sign up to request clarification or add additional context in comments.

2 Comments

can it be the result of adding /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/qr8v/.local/bin:/home/qr8v/.local/bin to bashrc? because before that whenever I did want to use the package it did say that it doesn't exist but after adding those the problem solved.
If you want to see where the path of some program is, you can use 'whereis program_name', and you'll see that there are often multiple paths. For example, if I run 'whereis python3' I get more than 10 paths because of virtual envs. The important thing is to know which path is for which project, and that's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.