Title: Command not found after installing successfully via pip
Tags: python;youtube;pip
Question: I just downloaded ```youtube-dl``` via pip as follows:

```sukhvir@SN:~$ sudo pip install youtube-dl
Downloading/unpacking youtube-dl
  Downloading youtube_dl-2015.06.25-py2.py3-none-any.whl (965kB): 965kB downloaded
Installing collected packages: youtube-dl
Successfully installed youtube-dl
Cleaning up...
```

then when i try to run it, the following error shows up:

```sukhvir@SN:~$ youtube-dl https://www.youtube.com/watch?v=QcIy9NiNbmo
-bash: youtube-dl: command not found
```

Can you please help as to why this is happening and how can i rectify this issue ?

Comment: It's a python module so maybe try running it inside the python shell?

Comment: its funny .. i am able to run it if i install it using easy_install .. but not if I do it using pip

Here is the accepted answer: I know it is a bit old, but I ran in the same problem.

The solution is simple: you installed it  with 'sudo' rights,
so if you run it with ```sudo youtube-dl``` will start without problem (as module).

To avoid this, you could install ```pip install --user youtube-dl```



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:07/01/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><youtube><pip>', 'Title': 'Command not found after installing successfully via pip', 'ViewCount': 3626, 'id': 31151383, 'user_AboutMe': '', 'user_AccountId': 1304738.0, 'user_DisplayName': 'sukhvir', 'user_Reputation': 4945.0, 'user_Views': 416.0, 'user_id': 1253932.0}}