Add installation instructions #409

Closed
opened 2026-02-20 21:12:04 -05:00 by deekerman · 6 comments
Owner

Originally created by @DrHyde on GitHub (Nov 12, 2012).

It's not obvious how to install this application, what it's pre-requisites are, and where to get them from:

$ git clone git://github.com/rg3/youtube-dl.git
Cloning into youtube-dl...
...
$ cd youtube-dl/
$ make
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
'import site' failed; use -v for traceback
Could not import runpy module
pandoc -s -w man README.md -o youtube-dl.1
make: pandoc: Command not found
make: *** [youtube-dl.1] Error 127

Yes, I do have python installed!

$ dpkg -l|grep python
ii python 2.6.6-3+squeeze7 interactive high-level object-oriented language (default version)
...

Originally created by @DrHyde on GitHub (Nov 12, 2012). It's not obvious how to install this application, what it's pre-requisites are, and where to get them from: $ git clone git://github.com/rg3/youtube-dl.git Cloning into youtube-dl... ... $ cd youtube-dl/ $ make Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] 'import site' failed; use -v for traceback Could not import runpy module pandoc -s -w man README.md -o youtube-dl.1 make: pandoc: Command not found make: **\* [youtube-dl.1] Error 127 Yes, I do have python installed! $ dpkg -l|grep python ii python 2.6.6-3+squeeze7 interactive high-level object-oriented language (default version) ...
Author
Owner

@Tailszefox commented on GitHub (Nov 12, 2012):

Those errors sound pretty weird, but it seems make gives up when it tries making the documentation, though. Do you have pandoc installed? (I assume you're running Ubuntu or Debian or the like, so a simple sudo apt-get install pandoc should do the trick.)

If you still get those errors after installing pandoc, try running make youtube-dl. And if you still get errors after that, try running the commands in the Makefile one by one to see which one fails. Here they are, as a reminder:

zip --quiet --junk-paths youtube-dl youtube_dl/*.py
echo '#!/usr/bin/env python' > youtube-dl
cat youtube-dl.zip >> youtube-dl
rm youtube-dl.zip
chmod a+x youtube-dl
@Tailszefox commented on GitHub (Nov 12, 2012): Those errors sound pretty weird, but it seems make gives up when it tries making the documentation, though. Do you have pandoc installed? (I assume you're running Ubuntu or Debian or the like, so a simple `sudo apt-get install pandoc` should do the trick.) If you still get those errors after installing pandoc, try running `make youtube-dl`. And if you _still_ get errors after that, try running the commands in the Makefile one by one to see which one fails. Here they are, as a reminder: ``` zip --quiet --junk-paths youtube-dl youtube_dl/*.py echo '#!/usr/bin/env python' > youtube-dl cat youtube-dl.zip >> youtube-dl rm youtube-dl.zip chmod a+x youtube-dl ```
Author
Owner

@phihag commented on GitHub (Nov 25, 2012):

As a user,

wget https://github.com/rg3/youtube-dl/blob/master/youtube-dl
chmod a+x youtube-dl

should do.

It's documented as such on http://rg3.github.com/youtube-dl/download.html . I'm pretty sure

Could not find platform independent libraries 
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
'import site' failed; use -v for traceback
Could not import runpy module

points to internal errors.

I cannot reproduce these errors on a brand-new debian squeeze with exactly your commands (after running sudo apt-get install -y make git zip). On what system are you? What is the value of the environment variable $PYTHONPATH?

@phihag commented on GitHub (Nov 25, 2012): As a user, ``` wget https://github.com/rg3/youtube-dl/blob/master/youtube-dl chmod a+x youtube-dl ``` should do. It's documented as such on http://rg3.github.com/youtube-dl/download.html . I'm pretty sure ``` Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] 'import site' failed; use -v for traceback Could not import runpy module ``` points to internal errors. I cannot reproduce these errors on a brand-new debian squeeze with exactly your commands (after running `sudo apt-get install -y make git zip`). On what system are you? What is the value of the environment variable `$PYTHONPATH`?
Author
Owner

@DrHyde commented on GitHub (Nov 27, 2012):

@Tailszefox: after installing pandoc like that, 'make youtube-dl' worked, in that it produced a file with the x bit set, but it still doesn't run:

$ ./youtube-dl l93b1o5RtxA
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
'import site' failed; use -v for traceback
Could not import runpy module

@phihag: I'm on Debian 6.0.5. There's no $PYTHONPATH. /usr/bin/python is version 2.6.6. After installing pandoc (I assumed it was part of python so didn't think to install it seperately) 'make' complains thus:

$ make
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
'import site' failed; use -v for traceback
Could not import runpy module
pandoc -s -w man README.md -o youtube-dl.1
pandoc: README.md: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)
make: *** [youtube-dl.1] Error 1

@DrHyde commented on GitHub (Nov 27, 2012): @Tailszefox: after installing pandoc like that, 'make youtube-dl' worked, in that it produced a file with the x bit set, but it still doesn't run: $ ./youtube-dl l93b1o5RtxA Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Could not import runpy module @phihag: I'm on Debian 6.0.5. There's no $PYTHONPATH. /usr/bin/python is version 2.6.6. After installing pandoc (I assumed it was part of python so didn't think to install it seperately) 'make' complains thus: $ make Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Could not import runpy module pandoc -s -w man README.md -o youtube-dl.1 pandoc: README.md: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character) make: **\* [youtube-dl.1] Error 1
Author
Owner

@Tailszefox commented on GitHub (Nov 27, 2012):

Have you tried setting the $PYTHONHOME variable to point to your installation? I would assume it is in /usr/lib/python2.6, though it may be somewhere else.

Try running the command like this, substituting the path for the appropriate one:

% env PYTHONHOME=/usr/lib/python2.6 ./youtube-dl

EDIT : Okay, I'm able to reproduce this by putting a bogus PYTHONHOME, which I suppose is the issue here. I'll keep looking into it.

EDIT 2 : As far as I can tell, this can happen if your $PYTHONHOME and/or $PYTHONPATH variable point to a different version than the one you're using when calling python. This is what I get when I try to run Python 2.6.6 with 2.7 libraries, for example:

% env PYTHONHOME=/usr/lib/python2.7 python 
'import site' failed; use -v for traceback
Python 2.6.6 (r266:84292, Nov 27 2012, 23:32:12) 
[GCC 4.6.3] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Do you get the same kind of error if you try to simply run python ?

@Tailszefox commented on GitHub (Nov 27, 2012): Have you tried setting the $PYTHONHOME variable to point to your installation? I would assume it is in /usr/lib/python2.6, though it may be somewhere else. Try running the command like this, substituting the path for the appropriate one: ``` % env PYTHONHOME=/usr/lib/python2.6 ./youtube-dl ``` EDIT : Okay, I'm able to reproduce this by putting a bogus PYTHONHOME, which I suppose is the issue here. I'll keep looking into it. EDIT 2 : As far as I can tell, this can happen if your $PYTHONHOME and/or $PYTHONPATH variable point to a different version than the one you're using when calling python. This is what I get when I try to run Python 2.6.6 with 2.7 libraries, for example: ``` % env PYTHONHOME=/usr/lib/python2.7 python 'import site' failed; use -v for traceback Python 2.6.6 (r266:84292, Nov 27 2012, 23:32:12) [GCC 4.6.3] on linux3 Type "help", "copyright", "credits" or "license" for more information. >>> ``` Do you get the same kind of error if you try to simply run `python` ?
Author
Owner

@DrHyde commented on GitHub (Nov 27, 2012):

yes indeed:

$ which python
/usr/bin/python
$ python
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
'import site' failed; use -v for traceback
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.

There are several py* directories in /usr/lib:

$ ls -ld /usr/lib/py*
drwxr-xr-x 2 root root 4096 Jul 6 14:10 /usr/lib/pymodules
drwxr-xr-x 3 root root 4096 Jan 30 2011 /usr/lib/python2.4
drwxr-xr-x 3 root root 4096 Jan 30 2011 /usr/lib/python2.5
drwxr-xr-x 2 root root 16384 Jul 6 14:10 /usr/lib/python2.6

I presume that the two ancient ones are lurking remnants from an older install of python which has since been upgraded to 2.6 - at some point this machine got dist-upgraded.

@DrHyde commented on GitHub (Nov 27, 2012): yes indeed: $ which python /usr/bin/python $ python Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. There are several py\* directories in /usr/lib: $ ls -ld /usr/lib/py* drwxr-xr-x 2 root root 4096 Jul 6 14:10 /usr/lib/pymodules drwxr-xr-x 3 root root 4096 Jan 30 2011 /usr/lib/python2.4 drwxr-xr-x 3 root root 4096 Jan 30 2011 /usr/lib/python2.5 drwxr-xr-x 2 root root 16384 Jul 6 14:10 /usr/lib/python2.6 I presume that the two ancient ones are lurking remnants from an older install of python which has since been upgraded to 2.6 - at some point this machine got dist-upgraded.
Author
Owner

@DrHyde commented on GitHub (Nov 27, 2012):

Anyway, this looks like a problem with my python install, and not with youtube-dl, so I'm gonna close the issue.

@DrHyde commented on GitHub (Nov 27, 2012): Anyway, this looks like a problem with my python install, and not with youtube-dl, so I'm gonna close the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#409
No description provided.