Command not found after installing successfully via pip - python

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 ?

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

Related

I cannot get past "collecting 'whatever package name' " on ANY python package I am trying to install

I cannot get past "collecting 'whatever package name' " on any python package I am trying to install..
I have installed python 3.5 with pip 7.1.2
This is what I have tried..
pip install telethon
and..
python -m pip install telethon
Just stops on Collecting Telethon.. No downloading after that..
Then I tried: pip -vvv install -U telethon --user
Results are:
C:\Users\ACER>pip -vvv install -U telethon --user
Collecting telethon
Getting page https://pypi.python.org/simple/telethon/
Starting new HTTPS connection (1): pypi.python.org
C:\Users\ACER>
I tried:
pip install scrapy
python -m pip install scrapy
Same thing!! Just stops at collecting scrapy.. No downloading after that..
I have downloaded the tarball files: pip install scrapy-master.tar.gz & pip install Telethon-1.16.0.tar.gz
full of errors when tring to install them locally..
All above is from CMD.. Then I have tried to install them directly from the repository via PyCharm. I get..
Failed to install package 'telethon'
Executed command:
pip install --user --index-url https://github.com/LonamiWebs/Telethon/ telethon==1.16.0
Error occured:
Non-zero exit code (-1073741819)
Proposed solution:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\ACER\AppData\Local\Programs\Python\Python35\python.exe'.
Command output:
Collecting telethon==1.16.0
I do not know whatelse to do to get basically ANY python package to install after "collecting 'whatever package name'"
However I am really tring to get Telethon installed..
Thanks in advance..
You can try adding
--no-cache-dir
while you are installing.
Hope that works.
pip install telethon --no-cache-dir
Check here for more info.
I upgraded Python to Version 3.8.. Everything working fine now :D

PIP installs correctly but does nothing when executed

I'm having trouble with Python.
I downloaded Python and pip without error.
But when I run pip install flask, it just waits a second and goes back to the command prompt.
Same issue when I run python -m pip install flask.
However, it works when I run py -m pip install flask.
Any ideas why this happens? Thanks!
My path is as follows:
%USERPROFILE%\AppData\Local\Programs\Python\Python38
%USERPROFILE%\AppData\Local\Programs\Python\Python38\Scripts
Message when installing pip.
Collecting pip
Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-20.1.1
You might have various versions of python. Can you just try your pip install by mentioning the version
python3.7 -m pip install flask

scikit_image library is not installing

I am trying to install scikit-image library in python 3.4.4on windows. I am using the following command:
pip install scikit-image
I am installing it in the following path
C:\Python34\Scripts
It's not working showing the following error:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Usman\AppData\Local\Temp\pip-build-utv6_a2u\scikit-image\
I tried also installing it through the .whl file,, but still it's not working.
Pip version is
pip 9.0.1
Please tell me what should I do?
Try to run one of the following and than try to install again the requested library.
pip install --upgrade setuptools or easy_install -U setuptools
As setuptools contains a lot of important files including egg files, it can cause problems when it's not updated\installed.

couldn't install pip in windows

I am trying to install pip in windows.
when i run the get-pip.py file i get the following message:
C:\Python27>python get-pip.py
Collecting pip Using cached pip-7.1.2-py2.py3-none-any.whl
Hash of the package https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d (from https://pypi.python.org/simple/pip/) (ab1a3864641ecb4ba77b0d30cfdc8442) doesn't match the expected hash 5ff9fec0be479e4e36df467556deed4d!
Bad md5 hash for package https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d (from https://pypi.python.org/simple/pip/)
I don't know what the problem is. can someone help me?
Thanks disflux for your comment that was useful and also this post.
I ignored the cache file using the option: --no-cache-dir
Now the command looks something like this C:\Python27>python get-pip.py --no-cache-dir
Successfully installed pip.

install Pyaudio - whl

I tried to install PyAudio on Windows 7 64bit.
Installing it with pip throws dependency errors which end up in the question how to satisfy those.
So i tried to install it with wheel, the suggestion was to just use pip install:
D:\Programming\Kivy>dir
...
27.03.2015 08:11 113.556 PyAudio.whl
D:\Programming\Kivy>pip install PyAudio.whl
Downloading/unpacking PyAudio.whl
Could not find any downloads that satisfy the requirement PyAudio.whl
No distributions at all found for PyAudio.whl
Storing complete log in C:\Users\WindowsPro\AppData\Roaming\pip\pip.log
Any suggestion how to install pyaudio?
What version of pip do you have? Show the output pip -V. It might be necessary to have a current pip version 6 to install the whl. If this is not the case do pip install --upgrade pip (it might be necessary to start the console with admin rights).
Did you download the library from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio? I just installed this version with pip and it works.
As an alternative you can download the installer exe from http://people.csail.mit.edu/hubert/pyaudio/#downloads and install it like a regular program.
If you cant donwload it by pip install pyaudio you can download it from here.
When you found PyAudio, find the version of your Python (ex. 3.7.2 32bit).
DOWNLOAD THE RIGHT VERSION. Once you found the .whl of your python version, download it. Install it by opening cmd, going to the folder that you save it and write pip install "pyaudio_whl_file.whl"
And that's it

Categories

Resources