Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring youtube-dl to use Python 3.4 instead of 2.7 #5193

Closed
AmperAndSand opened this issue Mar 13, 2015 · 5 comments
Closed

Configuring youtube-dl to use Python 3.4 instead of 2.7 #5193

AmperAndSand opened this issue Mar 13, 2015 · 5 comments

Comments

@AmperAndSand
Copy link

I have both Python 3.4 and Python 2.7 installed (both are the 64-bit versions on Windows 7). I've already set the PY_PYTHON environment variable to 3 (i.e. py.exe should run Python 3 by default, unless specified to run Python 2).py.exe --version gives an output of Python 3.4.3.

However, when I run youtube-dl, I get a [debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1 message. The reason I would like to use Python 3 is to get around the bug where output filenames have non-ASCII, Unicode characters stripped, which happens in Python 2.

@jaimeMF
Copy link
Collaborator

jaimeMF commented Mar 13, 2015

I guess that you are using the youtube-dl.exe version, that file is built with py2exe and includes its own copy of the python 2.7 interpreter and as far as I know there's no easy way to make it use python 3. If you have a normal python 3.4 installation you can just run pip install -U youtube_dl.

@jaimeMF jaimeMF closed this as completed Mar 13, 2015
@AmperAndSand
Copy link
Author

@jaimeMF That worked. Thank you.

@reggna
Copy link

reggna commented Mar 11, 2017

Or, if you're still using Ubuntu 14.4 where Python 2 is still predominant, you can run this:

pip3 install -U youtube_dl
python3 `which youtube-dl`

@lorenaceballos
Copy link

orena@lorena-To-be-filled-by-O-E-M:~$ pip3 install --upgrade youtube-dl
Collecting youtube-dl
Downloading https://files.pythonhosted.org/packages/ad/1f/ae3e500935979bec629bab80be8b6fea00f7d5e8cb29564cf0f9c5afe975/youtube_dl-2019.4.30-py2.py3-none-any.whl (1.8MB)
|████████████████████████████████| 1.8MB 1.1MB/s
Installing collected packages: youtube-dl
Found existing installation: youtube-dl 2018.3.14
ERROR: Cannot uninstall 'youtube-dl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

pip3 install --upgrade youtube-dl

@gamersalpha
Copy link

Hello not working :'(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants