bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
667 stars 124 forks source link

Documentation: Explain how to install youtube_dl (module 'youtube_dl' is not installed) #89

Open lemonscience33 opened 7 years ago

lemonscience33 commented 7 years ago

Hi there - I'm a newbie and I got a GitHub account just to ask this, so I'm sorry if this is a really obvious question.

I was able to backup my entire blog with this program - thank you! But now I'm making a second pass and trying to download videos from this year.

I installed youtube-dl and put the files in the tumblr-utils directory, and I'm able to run the program as admin and download Tumblr videos.

However, when I run the command "tumblr_backup.py -k --save-video [myblogname]" as admin, I get the error "tumblr_backup.py: error --save-video/-audio: module 'youtube_dl' is not installed"

Can you shed any light on this? Am I making a dumb newb mistake, or is there a problem in the program for Windows?

Thanks!

Hrxn commented 7 years ago

Well, either try to install youtube-dl via pip, i.e. pip install youtube-dl or try this

The correct way to install Youtube-DL so that other Python programs can import it is to download the .tar.gz archive, then use 7-Zip (or some other unzipper that can handle .tar.gz files) to extract the inner youtube_dl folder (the one that's currently about 3MB in size) to your Python's site-packages folder, e.g. C:\Python27\Lib\site-packages. There, it will automtically be found by tumblr_backup.

If you did it right, there will be the file ...\Python27\Lib\site-packages\youtube_dl\__init__.py (plus many others, of course), and this should just work in your Python shell:

>> import youtube_dl
>> youtube_dl.YoutubeDL
<class 'youtube_dl.YoutubeDL.YoutubeDL'>
>>
lemonscience33 commented 7 years ago

Bless you! Thanks, it worked right away.

cebtenzzre commented 5 years ago

Reopening as a documentation issue. Many people are having this problem.

Hrxn commented 5 years ago

What exactly does .tar.gz archive mean? [..]

In this case, it is the source release of youtube-dl as provided by the project. It can be found here, for example.

But please note that this shouldn't be necessary, unless you want to "install" youtube-dl manually.

All you probably want is a normal Python 2.x setup, by installing via the proper method for your OS. Then you can simply install youtube-dl with pip2 install youtube-dl etc..

Soundsgoood commented 5 years ago

Then you can simply install youtube-dl with pip2 install youtube-dl etc..

In what directory do you type "pip install youtube-dl"? I keep getting the "'pip' is not recognized as an internal or external command" error mentioned before.

cebtenzzre commented 5 years ago

@Soundsgoood Try python -m pip.

Soundsgoood commented 5 years ago

I tried installing Python on the same drive as my OS and tumblr_backup folder and now "pip --version" returns a version number. So that's solved.

neftd commented 5 years ago

Well, either try to install youtube-dl via pip, i.e. pip install youtube-dl or try this

The correct way to install Youtube-DL so that other Python programs can import it is to download the .tar.gz archive, then use 7-Zip (or some other unzipper that can handle .tar.gz files) to extract the inner youtube_dl folder (the one that's currently about 3MB in size) to your Python's site-packages folder, e.g. C:\Python27\Lib\site-packages. There, it will automtically be found by tumblr_backup.

If you did it right, there will be the file ...\Python27\Lib\site-packages\youtube_dl\__init__.py (plus many others, of course), and this should just work in your Python shell:

>>> import youtube_dl
>>> youtube_dl.YoutubeDL
<class 'youtube_dl.YoutubeDL.YoutubeDL'>
>>>

hello, i tried this. i've unpacked the archive to the site-packages folder. but. how do I get a python shell? to type above into?

cebtenzzre commented 5 years ago

Why is anybody extracting archives to install Python packages? @neftd Please use pip (python -m pip install youtube_dl).

cebtenzzre commented 5 years ago

BTW, once #185 is merged we can close this. I'm just waiting on confirmation from bbolli.